﻿// ....................................................................................................................
//	Author: Copyright (C) 2012 Ing. Marek Hubal
//	Email: hubal@acasoftware.org
// ....................................................................................................................

using System;

namespace core
{
    /// <summary>Trieda IFileExplorerSubPanel</summary>
    public class IFileExplorerSubPanel : System.Windows.Forms.UserControl
    {
        /// <summary>Trieda IIconExtractor</summary>
        public class IIconExtactor : IDisposable
        {
            protected IVirtualListView FList; // Listview
            protected INodeList FItems; // Zoznam nodov
            protected int FCurrentThreadID; // ID aktualneho spracovania
            protected bool FRunning; // Priznak behu
            protected System.Collections.Generic.List<INode> FWorkList;
            protected System.Threading.Thread FThread;
            protected int FExtractIconMode; // Mod extrahovania
            public bool Enabled;

            /// <summary>Konstruktor</summary>
            public IIconExtactor(IVirtualListView pList)
            {
                FList = pList;
                FItems = null;
                FCurrentThreadID = 0;
                FRunning = false;
                FWorkList = new System.Collections.Generic.List<INode>();
                FThread = null;
                FExtractIconMode = 0;
                Enabled = true;
            }
            /// <summary>Dispose metoda</summary>
            public void Dispose()
            {
                FCurrentThreadID++;
                FRunning = false;
                if (FWorkList != null)
                {
                    FWorkList.Clear(); FWorkList = null;
                }
                FItems = null;
                FThread = null;
            }

            /// <summary>Zastavenie procesu ziskavania ikoniek</summary>
            public void Stop()
            {
                FRunning = false;
            }
            /// <summary>Pokracovanie procesu ziskavania</summary>
            public void Resume()
            {
                FRunning = true;
            }
            /// <summary>Inicializacia</summary>
            /// <param name="pMode">mod extrahovania</param>
            /// <param name="pList">zoznam pre ziskavanie</param>
            public void Reset(int pMode, INodeList pList)
            {
                FExtractIconMode = pMode;
                FItems = pList;
                FCurrentThreadID++;
                FRunning = false;
                FThread = null;

                System.Threading.Monitor.Enter(FWorkList);
                FWorkList.Clear();
                System.Threading.Monitor.Exit(FWorkList);
            }

            /// <summary>Zaradenie node do zoznamu</summary>
            /// <param name="pNode">objekt</param>
            public void Add(INode pNode)
            {
                if (!Enabled) return; // Nie je povolene ziskavanie ikoniek v threade

                System.Threading.Monitor.Enter(FWorkList);
                for (int i = 0; i < FWorkList.Count; i++)
                {
                    if (FWorkList[i] == pNode) // Uz je v zozname spracovavanych?
                    {
                        System.Threading.Monitor.Exit(FWorkList);
                        return;
                    }
                }
                FWorkList.Add(pNode);
                System.Threading.Monitor.Exit(FWorkList);

                if (FThread != null) return; // Bezi uz thread?

                FExtractIconMode = IApp.Settings.FileExplorer_DisplayIconMode; // Nastavim mod spracovania
                FThread = new System.Threading.Thread(delegate()
                    {
                        int ThrID = FCurrentThreadID;
                        INode CurrentNode = null;
                        string CurrPath = FItems.CurrentPath;

                        switch (FItems.ID)
                        {
                            case INodeList.NODE_LIST_ID_VIRTUAL:
                                {
                                    if (FExtractIconMode >= 2) FExtractIconMode = 1; // Archim ma maximalne mod 1
                                } break;
                            case INodeList.NODE_LIST_ID_GZIP_ARCHIVE:
                            case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                            case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                            case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                            case INodeList.NODE_LIST_ID_FTP:
                                {
                                    if (FExtractIconMode >= 2) FExtractIconMode = 1; // Archim ma maximalne mod 1
                                } break;
                            default:
                                {
                                    if (FExtractIconMode == 3) FExtractIconMode = FItems.IsSlowDevice ? 1 : 2; // V pripade kombinacie urcim podla rychlosti zariadenia
                                } break;
                        }

                        while (true)
                        {
                            if (ThrID != FCurrentThreadID) break; // Test prerusenia...
                            if (!FRunning) break;
                            CurrentNode = null;

                            System.Threading.Monitor.Enter(FWorkList);
                            for (int i = FWorkList.Count - 1; i >= 0; i--)
                            {
                                if (FWorkList[i].IsDirectory) 
                                {
                                    CurrentNode = FWorkList[i];
                                    break;
                                }
                            }
                            if ((CurrentNode == null) && (FWorkList.Count > 0)) CurrentNode = FWorkList[FWorkList.Count - 1]; // Ziskam zaznam na spracovanie
                            System.Threading.Monitor.Exit(FWorkList);

                            if (CurrentNode == null) break; // Test prerusenia...
                            if (!FRunning) break;

                            switch (FExtractIconMode)
                            {
                                case 2: // Extrahovane ikony
                                    {
                                        switch (CurrentNode.ID)
                                        {
                                            case INode.NODE_ID_LOCAL_DRIVE:
                                            case INode.NODE_ID_LOCAL_ITEM:
                                                {
                                                    string FN = IFileSystem.AppendToPath(CurrPath, CurrentNode.Name); // Plny nazov
                                                    System.Drawing.Icon Icn = IFileSystem.GetExtractedIcon(FN, CurrentNode.Attributes);
                                                    if (Icn != null)
                                                    {
                                                        CurrentNode.ImageIndex = FList.AddSmallIcon(Icn);
                                                    }
                                                } break;
                                            default: CurrentNode.ImageIndex = CurrentNode.DefaultImageIndex; break;
                                        }
                                    } break;
                                case 1: // Asociovane ikony
                                    {
                                        switch (CurrentNode.ID)
                                        {
                                            case INode.NODE_ID_VIRTUAL_ITEM:
                                            case INode.NODE_ID_LOCAL_ITEM:
                                            case INode.NODE_ID_GZIP_ITEM:
                                            case INode.NODE_ID_TAR_ITEM:
                                            case INode.NODE_ID_RAR_ITEM:
                                            case INode.NODE_ID_FTP_ITEM:
                                            case INode.NODE_ID_ZIP_ITEM:
                                                {
                                                    System.Drawing.Icon Icn = IFileSystem.GetAssociatedIcon(CurrentNode.Ext, CurrentNode.Attributes);
                                                    if (Icn != null)
                                                    {
                                                        CurrentNode.ImageIndex = FList.AddSmallIcon(Icn);
                                                    }
                                                    else CurrentNode.ImageIndex = CurrentNode.DefaultImageIndex;
                                                } break;
                                            default: CurrentNode.ImageIndex = CurrentNode.DefaultImageIndex; break;
                                        }
                                    } break;
                            }

                            if (ThrID != FCurrentThreadID) break; // Test prerusenia...
                            if (!FRunning) break;

                            int I;
                            try
                            {
                                I = FItems.FindPosition(CurrentNode);
                                if (I != -1) FList.RedrawItem(I);
                            }
                            catch
                            {
                            }

                            if (ThrID != FCurrentThreadID) break; // Test prerusenia...
                            if (!FRunning) break;

                            System.Threading.Monitor.Enter(FWorkList);
                            FWorkList.Remove(CurrentNode); // Odstranim spracovany node
                            int C = FWorkList.Count; // Odlozim zvysny pocet
                            System.Threading.Monitor.Exit(FWorkList);

                            if (C == 0) break;
                        }

                        FThread = null; FRunning = false;
                        FList.Invalidate(); // Nakoniec prekreslim zoznam
                    }
                );
                FRunning = true;
                FThread.Start();
            }
        }

        /// <summary>IDragAndDropInfo</summary>
        protected class IDragAndDropInfo
        {
            public IFileExplorerSubPanel SourcePanel;
            public int CMD_ID;

            /// <summary>Konstruktor</summary>
            /// <param name="pSourcePanel">zdroj</param>
            /// <param name="pCMD_ID">ID prikazu</param>
            public IDragAndDropInfo(IFileExplorerSubPanel pSourcePanel, int pCMD_ID)
            {
                SourcePanel = pSourcePanel;
                CMD_ID = pCMD_ID;
            }
        }

        protected ISimpleStatusStrip FUpStatus, FDownStatus; // Horny a dolny status
        protected IVirtualListView FList; // Listview
        protected INodeList FItems; // Aktualny zoznam 
        protected IParamList FParams; // Parametre
        public IFileExplorerPanel ParentPanel; // Rodicovsky panel
        protected long FLastListUpdated; // Cas posledneho vyplnenie zoznamu
        protected IIconExtactor FIconExtractor; // Objekt pre riesenie ziskavania ikoniek
        protected bool FDisplayInternalItemMenu; // Priznak zobrazenia interneho menu polozky
        protected System.Windows.Forms.Timer FTimer; // Casovac okna
        protected int FRunMode; // Mod prace panela
        protected string FQuickFindValue; // Aktualna hodnota filtra pre rychle hladanie
        protected INodeList FQuickFindBackupList; // Zaloha originalneho zoznamu pri rychlom hladani
        protected IToolTip FListToolTip; // Tooltip pre listview
        protected System.Windows.Forms.DragDropEffects FCurrentAllowedDragDropEffects; // Mozne operacie dragdrop
        protected string[] FCurrentDragDropItems; // Zoznam objektov pri dragdrop operacii

        /// <summary>Property: SerializedParams</summary>
        public string SerializedParams
        {
            get
            {
                return FParams.Serialize(true);
            }
            set
            {
                FParams.Deserialize(value, true);
            }
        }
        /// <summary>Property: ActiveItemIndex</summary>
        public int ActiveItemIndex
        {
            get
            {
                return FList.SelectedIndex;
            }
            set
            {
                FList.SelectedIndex = value;
            }
        }
        /// <summary>Property: ActiveKeyValue</summary>
        public string ActiveKeyValue
        {
            get
            {
                INode N = FItems[ActiveItemIndex]; // Ziskam aktualny node
                return N == null ? "" : N.KeyValue; // Vratim key hodnotu
            }
            set
            {
                int I = FItems.FindByKeyValue(value); // Hladam poziciu node s rovnakou key. hodnotou
                ActiveItemIndex = I == -1 ? 0 : I;
            }
        }
        /// <summary>Property: CurrentPath</summary>
        public string CurrentPath
        {
            get
            {
                return FItems.CurrentPath;
            }
        }
        /// <summary>Property: ActiveItemExpandPath</summary>
        public string ActiveItemExpandPath
        {
            get
            {
                return FItems.GetNodeExpandPath(ActiveItemIndex);
            }
        }
        /// <summary>Property: CanExpandActiveItem</summary>
        public bool CanExpandActiveItem
        {
            get
            {
                return FItems.CanNodeExpand(ActiveItemIndex);
            }
        }
        /// <summary>Property: OppositePanel</summary>
        public IFileExplorerSubPanel OppositePanel
        {
            get
            {
                return ParentPanel.GetOppositePanel(this);
            }
        }
        /// <summary>Property: ActiveConnectionProvider</summary>
        public int ActiveConnectionProvider
        {
            get
            {
                return FItems.ConnectionProvider;
            }
        }
        /// <summary>Property: ActiveConnectionProvider</summary>
        public int ActiveItemConnectionProvider
        {
            get
            {
                return FItems.GetNodeConnectionProvider(ActiveItemIndex);
            }
        }
        /// <summary>Property: InitPath</summary>
        public string InitPath
        {
            get
            {
                switch (FItems.ID)
                {
                    case INodeList.NODE_LIST_ID_GZIP_ARCHIVE:
                    case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                    case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                    case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                        return IFileSystem.ExtractPath(FItems.BasePath);
                    case INodeList.NODE_LIST_ID_FTP:
                        return "web://";
                    case INodeList.NODE_LIST_ID_SMB_NETWORK:
                        return "";
                    case INodeList.NODE_LIST_ID_VIRTUAL:
                        return FItems.ParentPath;
                    default: return FItems.CurrentPath;
                }
            }
        }
        /// <summary>Property: InitKeyValue</summary>
        public string InitKeyValue
        {
            get
            {
                switch (FItems.ID)
                {
                    case INodeList.NODE_LIST_ID_GZIP_ARCHIVE:
                    case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                    case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                    case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                        return IFileSystem.ExtractName(FItems.BasePath).ToLower();
                    case INodeList.NODE_LIST_ID_FTP:
                        return ((INodeList_FTP)FItems).RootKeyValue;
                    case INodeList.NODE_LIST_ID_SMB_NETWORK:
                        return "////";
                    case INodeList.NODE_LIST_ID_VIRTUAL:
                        return "";
                    default: return ActiveKeyValue;
                }
            }
        }

        /// <summary>Konstruktor</summary>
        public IFileExplorerSubPanel()
        {
            // Inicializacia
            FItems = null;
            FParams = new IParamList();
            FLastListUpdated = DateTime.MinValue.Ticks;
            FIconExtractor = null;
            FDisplayInternalItemMenu = true;
            FTimer = new System.Windows.Forms.Timer(); FTimer.Interval = 1000; FTimer.Tick += Event_TimerTick; // Vytvorim casovac
            FRunMode = 0;
        }
        /// <summary>Dispose metoda</summary>
        /// <param name="disposing">parameter</param>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing); // Volam predchodcu
            FItems = (INodeList)ICore.DisposeObject(FItems); // Zrusim objekty
            FParams = (IParamList)ICore.DisposeObject(FParams);
            FIconExtractor = (IIconExtactor)ICore.DisposeObject(FIconExtractor);
            FTimer = (System.Windows.Forms.Timer)ICore.DisposeObject(FTimer);
        }

        /// <summary>Vyplnenie ListView</summary>
        /// <param name="pCreateColumns">priznak vytvorenia stlpcov</param>
        protected void FillList(bool pCreateColumns) 
        {
            if (pCreateColumns) // Vytvorit stlpce?
            {
                FList.Columns.Clear();
                int C = FItems.VisibleColsCount; // Pocet viditelnych stlpcov

                for (int i = 0; i < C; i++)
                {
                    FList.CreateColumn(FItems.GetVisibleColumnName(i), FItems.GetVisibleColumnWidth(i), FItems.GetVisibleColumnAlignment(i));
                }
            }

            SetImageList(); // Nastavim ikony
            FList.ItemsCount = FItems.NodesCount; // Nastavim novy pocet
        }
        /// <summary>Ulozenie parametrov aktualneho zoznamu</summary>
        protected void SaveNodeListParams()
        {
            if (FItems != null) FParams.SetParam(string.Format("NL_{0}", FItems.ID), FItems.SerializedParams);
        }
        /// <summary>Nacitanie parametrov aktualneho zoznamu</summary>
        protected void LoadNodeListParams()
        {
            if (FItems != null) FItems.SerializedParams = FParams.GetParam(string.Format("NL_{0}", FItems.ID), "");
        }
        /// <summary>Nastavenie zoznamu ikoniek podla aktualneho nastavenia</summary>
        protected void SetImageList()
        {
            switch(IApp.Settings.FileExplorer_DisplayIconMode) {
                case 1:
                    {
                        ICore.CopyImageList(IApp.App.AppSmallImageList, FList.SmallImages); // Skopirujem
                    } break;
                default:
                    {
                        ICore.CopyImageList(IApp.App.AppSmallImageList, FList.SmallImages); // Skopirujem
                    } break;
            }
        }
        /// <summary>Test moznosti spustenia prikazu</summary>
        /// <param name="pCMD_ID">ID prikazu</param>
        /// <returns>true / false</returns>
        protected bool CanExecCMD(int pCMD_ID)
        {
            switch (pCMD_ID)
            {
                case ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL:
                    {
                        if (ParentPanel.GetPanelPosition(this) == ICmd.CMD_PANEL_TARGET_RIGHT) return true;
                    } break;
                case ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL:
                    {
                        if (ParentPanel.GetPanelPosition(this) == ICmd.CMD_PANEL_TARGET_LEFT) return true;
                    } break;
            }

            if (FRunMode == 1) return false; // Je mod rychleho hladania

            if (!ParentPanel.IsPanelVisible(this)) return false; // Panel nie je viditelny?

            int I = ActiveItemIndex;

            switch (pCMD_ID)
            {
                case ICmd.CMD_ID_FILE_EXPLORER_MULTI_RENAME_TOOL:
                    {
                        if (!FItems.CanMultiRename) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FULL_LIST:
                    {
                        switch (FItems.ID)
                        {
                            case INodeList.NODE_LIST_ID_LOCAL_ITEMS: break;
                            default: return false;
                        }
                        return FItems.CurrentPath != "";
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_EJECT_CD_DEVICE:
                    {
                        if (FItems.IsCDDevice) return true;
                        return FItems.IsNodeCDDevice(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_INTERNAL_VIEWER:
                    {
                        if (FItems.SelectedFilesCount > 0) return FItems.CanBeViewed;
                        return FItems.CanNodeBeViewed(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_NEW_FILE_FROM_CLIPBOARD:
                    {
                        if (!FItems.CanCreateFileFromClipboard) return false;
                        return ICore.GetClipboardDataType() > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_EMPTY_FILE:
                    {
                        return FItems.CanCreateEmptyFile;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_SELECTED:
                    {
                        if (!FItems.IsDecryptionSource) return false;
                        return FItems.SelectedFilesCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_ACTIVE:
                    {
                        return FItems.IsDecryptionSourceItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_ACTIVE:
                    {
                        return FItems.IsEncryptionSourceItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_SELECTED:
                    {
                        if (!FItems.IsEncryptionSource) return false;
                        return FItems.SelectedFilesCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_EXPORT_LIST_TO_FILE:
                    {
                        if (FItems.SelectedCount > 0) return true;
                        return I == -1 ? false : FItems[I].IsDirectory || FItems[I].IsFile;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_SELECTED:
                    {
                        if (FItems.SelectedCount == 0) return false;
                        if (!FItems.IsSourceForArchive) return false;
                        return FItems.IsDestinationForArchive;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!FItems.IsSourceForArchiveItem(I)) return false;
                        return FItems.IsDestinationForArchive;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FILE_CLONE:
                    {
                        if (!FItems.CanCloneFile) return false;
                        return FItems[I].IsFile;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_SELECTED:
                    {
                        return FItems.CanMakeShortcut;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanNodeMakeShortcut(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR:
                    {
                        return FItems.ID == INodeList.NODE_LIST_ID_CLOUD_ROOT;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_DELETE_ACTIVE:
                    {
                        if (FItems.ID != INodeList.NODE_LIST_ID_CLOUD_ROOT) return false;
                        return I != -1;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_EDIT:
                    {
                        if (FItems.ID != INodeList.NODE_LIST_ID_CLOUD_ROOT) return false;
                        return I != -1;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_NEW_FTP:
                    {
                        return FItems.ID == INodeList.NODE_LIST_ID_CLOUD_ROOT;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR_FTP:
                    {
                        return FItems.ID == INodeList.NODE_LIST_ID_CLOUD_ROOT;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_VIEWER:
                    {
                        if (I == -1) return false;
                        return FItems.CanNodeBeViewed(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_EDITOR:
                    {
                        if (I == -1) return false;
                        return FItems.CanNodeBeEdited(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_SELECTED:
                    {
                        if (FItems.SelectedFilesCount == 0) return false;
                        return FItems.CanVerifyChecksum;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanVerifyChecksumItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanCalcucateChecksumItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_SELECTED:
                    {
                        if (FItems.SelectedFilesCount == 0) return false;
                        return FItems.CanCalcucateChecksum;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SPLIT_FILES:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsCopySource) return false;
                        if (I == -1) return false;
                        return FItems[I].IsFile;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_JOIN_FILES:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsCopySource) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_SELECTED:
                    {
                        if (FItems.SelectedCount == 0) return false;
                        return FItems.CanChangeAttributes;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanChangeAttributesNode(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_SELECTED:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        return FItems.GetCountOfSelectedFullNames_ArchivesSupportExtract() > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!ParentPanel.IsDualPanelMode) return false;
                        return FItems.CanExtractArchiveNode(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_SELECTED:
                    {
                        return FItems.GetCountOfSelectedFullNames_ArchivesSupportTest() > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanTestArchiveNode(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED:
                    {
                        if (FItems.SelectedCount == 0) return false;
                        return FItems.CanDelete;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanDeleteItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.CanShellCutItem(I)) return false;
                        if (!OppositePanel.FItems.CanShellPaste) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_SELECTED:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.CanShellCut) return false;
                        if (!OppositePanel.FItems.CanShellPaste) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsMoveSourceItem(I)) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SELECTED:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsMoveSource) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsMoveSource) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return (I != -1) || (FItems.SelectedCount > 0);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE:
                    {
                        if (I == -1) return false;
                        return FItems.CanTrashItem(I);    
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_SELECTED:
                    {
                        if (!FItems.CanTrash) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.CanShellCopyItem(I)) return false;
                        if (!OppositePanel.FItems.CanShellPaste) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_SELECTED:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.CanShellCopy) return false;
                        if (!OppositePanel.FItems.CanShellPaste) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE:
                    {
                        if (I == -1) return false;
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsCopySourceItem(I)) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SELECTED:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsCopySource) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return FItems.SelectedCount > 0;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM:
                    {
                        if (!ParentPanel.IsDualPanelMode) return false;
                        if (!FItems.IsCopySource) return false;
                        if (!OppositePanel.FItems.IsCopyDestination) return false;
                        return (I != -1) || (FItems.SelectedCount > 0);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM:
                    {
                        return FItems.CanRenameItem(I);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER:
                    {
                        return FItems.CanCreateFolder;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED:
                    {
                        if (I == -1) return FItems.SelectedCount > 0;
                        switch (FItems[I].ID)
                        {
                            case INode.NODE_ID_LOCAL_ITEM:
                            case INode.NODE_ID_TAR_ITEM:
                            case INode.NODE_ID_LOCAL_DRIVE:
                            case INode.NODE_ID_RAR_ITEM:
                            case INode.NODE_ID_ZIP_ITEM:
                                return true;
                            default: return false;
                        }
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE:
                    {
                        if (I == -1) return false;
                        return FItems[I].IsDirectory;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES_PATH:
                    {
                        switch (FItems.ID)
                        {
                            case INodeList.NODE_LIST_ID_LOCAL_ITEMS: 
                                return true;
                            default: return false;
                        }
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT:
                    {
                        if (!FItems.CanShellPrint) return false;
                        return (I != -1) || (FItems.SelectedCount > 0);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY:
                    {
                        if (!FItems.CanShellCopy) return false;
                        return (I != -1) || (FItems.SelectedCount > 0);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PASTE:
                    {
                        return FItems.CanShellPaste;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT:
                    {
                        if (!FItems.CanShellCut) return false;
                        return (I != -1) || (FItems.SelectedCount > 0);
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_EXT:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_EXT:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_NAME:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_NAME:
                    {
                        if (I == -1) return false;
                        if (!FItems.CanSelect) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FILES:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FULL_FILES:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_SAVE:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_SAVE:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_HIDE_SELECTION:
                    {
                        if (FItems.SelectedCount == 0) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_SAME:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_OTHER:
                    {
                        if (FItems.CanSelect) return true;
                        return OppositePanel.FItems.CanSelect;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_DIRS:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_DIRS:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_DIRS:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_FILES:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_FILES:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_FILES:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_LOAD:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_LOAD:
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_BY_FILTER:
                    {
                        if (!FItems.CanSelect) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ACTIVE:
                    {
                        if (!FItems.CanSelect) return false;
                        if (I == -1) return false;
                        return true;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SAME_PANELS:
                    {
                        return ParentPanel.IsDualPanelMode;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICE_ROOT:
                    {
                        return FItems.CurrentPath != FItems.DeviceRootPath;
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICES:
                case ICmd.CMD_ID_FILE_EXPLORER_GO_NEXT_DEVICE:
                case ICmd.CMD_ID_FILE_EXPLORER_GO_PREV_DEVICE:
                    {
                        return FItems.CurrentPath != "";
                    }
                case ICmd.CMD_ID_FILE_EXPLORER_NEW_TAB_CURRENT_ITEM:
                case ICmd.CMD_ID_FILE_EXPLORER_EXPAND:
                case ICmd.CMD_ID_FILE_EXPLORER_FORCE_OPEN:
                case ICmd.CMD_ID_FILE_EXPLORER_OPEN:
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY_ACTIVE:
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT_ACTIVE:
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES:
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT_ACTIVE:
                    {
                        if (I == -1) return false;
                        return true;
                    }
            }
            return true; // Prikaz je mozne spustit
        }
        /// <summary>Reload obsahu</summary>
        /// <param name="pNewIndex">node, ktory ma byt po reloade aktivny</param>
        protected void Reload(string pInitKeyValue = null)
        {
            if (FItems.ID == INodeList.NODE_LIST_ID_VIRTUAL) return; // Virtualny zoznam nereloadujem

            string K = pInitKeyValue == null ? ActiveKeyValue : pInitKeyValue;
            if (Go(FItems.CurrentPath, false, true, K, false, true, FItems.ConnectionProvider)) return; // Skusim reload

            string P = IFileSystem.ExtractPath(FItems.CurrentPath); // Ziskam rodica
            while (true)
            {
                if (Go(P, false, true)) return; // Pokusim sa expandovat
                P = IFileSystem.ExtractPath(P); // Dalsia uroven
            }
        }
        /// <summary>Aktualizacia obidvoch statusov</summary>
        /// <param name="pUpStatus">priznak aktualizacie horneho statusu</param>
        /// <param name="pDownStatus">priznak aktualizacie dolneho statusu</param>
        protected void UpdateStatuses(bool pUpStatus = true, bool pDownStatus = true)
        {
            if (pUpStatus) // Aktualizovat horny status?
            {
                string S;
                switch (FItems.ID)
                {
                    case INodeList.NODE_LIST_ID_ROOT: S = lang.NODE_LIST_ROOT_TEXT_7; break;
                    case INodeList.NODE_LIST_ID_LOCAL_ITEMS:
                        {
                            S = FItems.CurrentPath;
                            long FreeSpace = FItems.DeviceFreeSpace;
                            if (FreeSpace != -1) S += " " + string.Format(lang.NODE_LIST_LOCAL_ITEMS_TEXT_11_1, ICore.Size2String((ulong)FreeSpace, IApp.Settings.FileExplorer_DisplaySizeMode));
                        } break;
                    case INodeList.NODE_LIST_ID_SMB_NETWORK: S = lang.NODE_LIST_SMB_NETWORK_TEXT_3; break;
                    case INodeList.NODE_LIST_ID_SMB_SHARES: S = string.Format(lang.NODE_LIST_SMB_SHARES_TEXT_8, IFileSystem.ExtractName(FItems.CurrentPath)); break;
                    case INodeList.NODE_LIST_ID_GZIP_ARCHIVE: S = string.Format(lang.NODE_LIST_GZIP_ARCHIVE_TEXT_9, FItems.CurrentPath); break;
                    case INodeList.NODE_LIST_ID_TAR_ARCHIVE: S = string.Format(string.Format(lang.NODE_LIST_TAR_ARCHIVE_TEXT_11, FItems.CurrentPath, ((INodeList_TAR)FItems).ArchiveTypeString)); break;
                    case INodeList.NODE_LIST_ID_RAR_ARCHIVE: S = string.Format(string.Format(lang.NODE_LIST_RAR_ARCHIVE_TEXT_10, FItems.CurrentPath)); break;
                    case INodeList.NODE_LIST_ID_ZIP_ARCHIVE: S = string.Format(string.Format(lang.NODE_LIST_ZIP_ARCHIVE_TEXT_12, FItems.CurrentPath)); break;
                    case INodeList.NODE_LIST_ID_FTP: S = string.Format(string.Format(lang.NODE_LIST_FTP_TEXT_8, FItems.CurrentPath)); break;
                    case INodeList.NODE_LIST_ID_CLOUD_ROOT: S = lang.NODE_LIST_CLOUD_DEVICES_TEXT_6; break;
                    case INodeList.NODE_LIST_ID_VIRTUAL: S = ((INodeList_VirtualItems)FItems).ListDescription; break;
                    default: S = ""; break;
                }
                FUpStatus.SimpleText = S; // Nastavim
            }

            if (pDownStatus) // Aktualizovat dolny status?
            {
                string S;
                switch (FRunMode)
                {
                    case 1:
                        {
                            S = string.Format(lang.FILE_EXPLORER_TEXT_11, FQuickFindValue);
                        } break;
                    default:
                        {
                            switch (FItems.ID)
                            {
                                case INodeList.NODE_LIST_ID_GZIP_ARCHIVE:
                                case INodeList.NODE_LIST_ID_LOCAL_ITEMS:
                                case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                                case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                                case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                                case INodeList.NODE_LIST_ID_FTP:
                                case INodeList.NODE_LIST_ID_VIRTUAL:
                                    {
                                        S = string.Format(lang.NODE_LIST_LOCAL_ITEMS_TEXT_11_2, ICore.Size2String((ulong)FItems.SelectedItemsSize, IApp.Settings.FileExplorer_DisplaySizeMode), ICore.Size2String((ulong)FItems.ItemsSize, IApp.Settings.FileExplorer_DisplaySizeMode), FItems.SelectedFilesCount, FItems.FilesCount, FItems.SelectedDirsCount, FItems.DirsCount);
                                    } break;
                                default: S = ""; break;
                            }
                            if (FItems.CachedContent) S += " (" + lang.FILE_EXPLORER_TEXT_7 + ")";
                        } break;
                }
                FDownStatus.SimpleText = S.Trim(); // Nastavim
            }
        }
        /// <summary>Zmena viditelnosti stlpca</summary>
        /// <param name="pIndex">pozicia</param>
        protected void InvertColumnVisibility(int pIndex)
        {
            if (!FItems.CanHideColumn(pIndex)) return; // Test pripustnosti

            string K = ActiveKeyValue;
            FList.BeginCreate();
            
            FItems.SetColumnVisibility(pIndex, !FItems.IsColumnVisible(pIndex)); // Preklopi viditelnost
            SaveNodeListParams();

            FillList(true); // Vyplnim zoznam
            FList.EndCreate(FItems.FindByKeyValue(K));

            FLastListUpdated = DateTime.Now.Ticks;
            UpdateStatuses(); // Aktualizujem statusy
        
        }
        /// <summary>Zmena stlpca triedenia</summary>
        /// <param name="pCol">stlpec</param>
        protected void ChangeSortColumn(int pCol)
        {
            if (!FItems.CanSort) return; // Test spravnosti
            if (!FItems.IsSortColumn(pCol)) return;

            IApp.App.WaitCursor = true;
            int C = FItems.SortColumn;
            if (C == pCol) FItems.SortAsc = !FItems.SortAsc; // Nastavim nove udaje
            else FItems.SortColumn = pCol;

            SaveNodeListParams();
            string K = ActiveKeyValue; // Aktualnma polozka
            FItems.DiscardDisplayData(); // Zrusim data pre zobrazenie
            FItems.Sort(); // Zotriedim 
            FList.Invalidate(); // Refresnem obsah
            ActiveKeyValue = K;

            UpdateStatuses(); // Aktualizujem statusy
            FList.SetSortIcon(!FItems.CanSort ? -1 : FItems.SortColumn, FItems.SortAsc); // Nastavim ikonu triedenia
            IApp.App.WaitCursor = false;
        }
        /// <summary>Presun na dalsi zaznam</summary>
        protected void MoveToNextItem()
        {
            int I = FList.SelectedIndex; // Ziskam poziciu

            if (I == -1) I = 0; // Upravim ju
            else I = I >= FList.ItemsCount - 1 ? FList.ItemsCount - 1 : I + 1;

            FList.SelectedIndex = I; // Ulozim novu poziciu
        }
        /// <summary>Zaciatok nacitavania noveho obsahu</summary>
        protected void BeginLoadContent() 
        {
            if (FItems == null) return; // Ziadny aktualny obsah?
            FItems.StopChangedWatch(); // Zastavim sledovanie zmeny
            FTimer.Stop(); // Zastavim timer
        }
        /// <summary>Zrusenie nacitavania noveho obsahu</summary>
        protected void CancelLoadContent()
        {
            if (FItems == null) return; // Ziadny aktualny obsah?
            FItems.StartChangedWatch(); // Povolim sledovanie zmeny
            FTimer.Start(); // Pustim timer
        }
        /// <summary>Spustenie rychleho hladania</summary>
        protected void StartQuickFind()
        {
            FList.KeyDown += Event_KeyDown_FListQuickFind;
            FList.KeyPress += Event_KeyPress_FListQuickFind;
            FQuickFindValue = ""; FQuickFindBackupList = FItems; // Inicializujem
            FItems = INodeList.CreateNodeList(FQuickFindBackupList.CurrentPath);
            using (INodeFilters F = new INodeFilters()) FQuickFindBackupList.FilterList(F, FItems);

            FRunMode = 1; // Mod hladania
            UpdateStatuses(); // Aktualizujem statusy
        }
        /// <summary>Zrusenie rychleho hladania</summary>
        protected void StopQuickFind()
        {
            FList.KeyDown -= Event_KeyDown_FListQuickFind;
            FList.KeyPress -= Event_KeyPress_FListQuickFind;
            string K = ActiveKeyValue;

            FItems = (INodeList)ICore.DisposeObject(FItems);
            FItems = FQuickFindBackupList;
            
            FList.BeginCreate();
            FillList(false);
            FItems.DiscardDisplayData();
            FList.EndCreate(FItems.FindByKeyValue(K));
            FList.Refresh();
            FRunMode = 0; // Normalny mod
            
            UpdateStatuses(); // Aktualizujem statusy
        }
        /// <summary>Aktualizacia rychleho hladania</summary>
        protected void UpdateQuickFind()
        {
            IApp.App.WaitCursor = true;

            string K = ActiveKeyValue;
            FItems = (INodeList)ICore.DisposeObject(FItems);
            FItems = FQuickFindBackupList.CloneList();
            using (INodeFilters F = new INodeFilters())
            {
                INodeFilter F1 = new INodeFilter();
                if (FQuickFindValue != "")
                {
                    F1.UseName = true; F1.FilterValue_Name = FQuickFindValue;
                }
                F.AddFilter(F1);
                FQuickFindBackupList.FilterList(F, FItems);
            }

            FList.BeginCreate();
            FillList(false);
            FItems.DiscardDisplayData();
            FList.EndCreate(FItems.FindByKeyValue(K));
            FList.Refresh();
            UpdateStatuses(); // Aktualizujem statusy
            IApp.App.WaitCursor = false;
        }
        /// <summary>Potvrdenie vysledkov rychleho hladania</summary>
        protected void AcceptQuickFind()
        {
            FList.KeyDown -= Event_KeyDown_FListQuickFind;
            FList.KeyPress -= Event_KeyPress_FListQuickFind;
            string K = ActiveKeyValue;

            FItems = (INodeList)ICore.DisposeObject(FItems);
            FItems = FQuickFindBackupList;

            using (INodeFilters F = new INodeFilters())
            {
                INodeFilter F1 = new INodeFilter();
                if (FQuickFindValue != "")
                {
                    F1.UseName = true; F1.FilterValue_Name = FQuickFindValue;
                }
                F.AddFilter(F1);
                FItems.FilterList(F, null);
            }

            FList.BeginCreate();
            FillList(false);
            FItems.DiscardDisplayData();
            FList.EndCreate(FItems.FindByKeyValue(K));
            FList.Refresh();
            FRunMode = 0; // Normalny mod

            UpdateStatuses(); // Aktualizujem statusy
        }
        /// <summary>Vytvorenie tooltip retazca</summary>
        /// <param name="pNode">node</param>
        /// <returns>obsah</returns>
        protected string CreateItemToolTip(int pIndex)
        {
            switch (IApp.Settings.FileExplorer_ItemToolTipMode)
            {
                case 1: // Zakladne info
                    {
                        return FItems.CreateBaseToolTipInfo(pIndex).Trim();
                    }
                case 2: // Rozsirene info
                    {
                        return FItems.CreateExtendedToolTipInfo(pIndex).Trim();
                    }
                default: return "";
            }
        }
        /// <summary>Vypocet velkosti priecinku</summary>
        /// <param name="pName">nazov priecinku</param>
        /// <param name="pInteruptVariable">priznak prerusenia</param>
        /// <returns>velkost</returns>
        protected long CalculateFolderSize(string pName, IThrSafeVariable pInteruptVariable)
        {
            if (IFileSystem.IsReparseLink(pName)) return 0; // Preskocim reparse link

            long Size = 0;
            using (INode N = new INode()) // Vytvorim node
            {
                using (INodeList L = INodeList.CreateNodeList(pName)) // Vytvorim nodelist
                { // Ziskam node list
                    switch (L.ID)
                    {
                        case INodeList.NODE_LIST_ID_LOCAL_ITEMS:
                        case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                        case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                        case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                            break;
                        default: return 0; // Preskocim ine typy
                    }

                    L.BeginReadCache();
                    if (L.BeginExpand() != 0) return 0; // Zacnem expand
                    while (L.ExpandNext(null, N) == 1)
                    {
                        if (pInteruptVariable.BoolValue) return -1; // Prerusene?

                        if (N.IsFile) Size += N.Size; // Je to subor
                        else
                        {
                            long S1 = CalculateFolderSize(IFileSystem.AppendToPath(pName, N.Name), pInteruptVariable);
                            if (S1 == -1) return -1; // Prerusene?

                            Size += S1; // Pridam dlzku poadresara
                        }
                        N.Clear();
                    }
                    L.CloseExpand(); // Uzatvorim expand
                }
            }
            return Size; // Vratim dlzku
        }
        /// <summary>Vypocet velkosti priecinku</summary>
        /// <param name="pName">nazov priecinku</param>
        /// <param name="pInteruptVariable">priznak prerusenia</param>
        /// <returns>velkost</returns>
        protected bool CalculateFolderSpaceOccupied(string pName, INodeList.IComputeOccupiedSpaceData pData, IThrSafeVariable pInteruptVariable)
        {
            if (IFileSystem.IsReparseLink(pName)) return true; // Preskocim reparse link

            using (INode N = new INode()) // Vytvorim node
            {
                using (INodeList L = INodeList.CreateNodeList(pName)) // Vytvorim nodelist
                { // Ziskam node list
                    switch (L.ID)
                    {
                        case INodeList.NODE_LIST_ID_LOCAL_ITEMS:
                        case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                        case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                        case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                            break;
                        default: return false; // Preskocim ine typy
                    }

                    L.BeginReadCache();
                    if (L.BeginExpand() != 0) return true; // Zacnem expand
                    while (L.ExpandNext(null, N) == 1)
                    {
                        if (pInteruptVariable.BoolValue) return false; // Prerusene?

                        if (N.IsFile) pData.AddFile(N.Size); // Je to subor
                        else
                        {
                            if (!CalculateFolderSpaceOccupied(IFileSystem.AppendToPath(pName, N.Name), pData, pInteruptVariable)) return false;
                        }
                        N.Clear();
                    }
                    L.CloseExpand(); // Uzatvorim expand
                }
            }
            pData.AddDir(); // Zaradim priecinok
            return true; // Vsetko OK
        }

        /// <summary>Vytvorenie podmenu - viditelnost stlpcov</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_ColumnVisibility(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            IToolStripMenuItem M;

            int C = FItems.ColsCount; // Pocet vsetkych stlpcov
            for (int i = 0; i < C; i++)
            {
                M = IToolStrip.CreateMenuItem(pParent, FItems.GetColumnName(i), Event_MenuItemClick_ColumnVisibility);
                M.Enabled = FItems.CanHideColumn(i); M.Checked = FItems.IsColumnVisible(i); M.Tag = i;
            }
        }
        /// <summary>Vytvorenie podmenu - triedenie zaznamov</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_SortingItems(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            IToolStripMenuItem M;

            int C = FItems.ColsCount; // Pocet vsetkych stlpcov
            int SC = FItems.SortColumn;

            for (int i = 0; i < C; i++)
            {
                if (!FItems.IsSortColumn(i)) continue;
                M = IToolStrip.CreateMenuItem(pParent, FItems.GetColumnName(i), Event_MenuItemClick_SortingItems);
                M.Checked = FItems.IsColumnVisible(i); M.Tag = i; M.Checked = i == SC;
            }
            IToolStrip.CreateSeparator(pParent, true);

            M = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS_1, Event_MenuItemClick_SortingItems);
            M.Tag = SC; M.Checked = FItems.SortAsc;
        }
        /// <summary>Vytvorenie podmenu - internetove uloziska</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_CloudDevices(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            IToolStripMenuItem M2;
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            M2 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_NEW);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_NEW_FTP, ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_NEW_FTP, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_EDIT, ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_EDIT, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);
            M2 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_DELETE);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_DELETE_ACTIVE, ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_DELETE_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(M2.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_FTP_CLEAR, ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR_FTP, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(M2.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD_CLEAR, ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_ROOT</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_ROOT(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1, M2;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            // Shell
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_SHELL);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_PROPERTIES, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Prikazy
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COMMANDS);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SHOW_CMD, ICmd.CMD_ID_FILE_EXPLORER_RUN_COMMAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.IsNodeCDDevice(ActiveItemIndex))
            {
                IToolStrip.CreateSeparator(M2.DropDownItems, true);
                IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EJECT_CD_MEDIUM, ICmd.CMD_ID_FILE_EXPLORER_EJECT_CD_DEVICE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            }

            // Siet
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_MAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_MAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_UNMAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_UNMAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);

            IToolStrip.CreateSeparator(M1.DropDownItems);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Koniec rozsirene funkcie

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_LOCAL_ITEMS</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_LOCAL_ITEMS(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela
            int I = ActiveItemIndex; // Aktivny zaznam

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1, M2;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia
            CreateMenu_FilterItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS).DropDownItems); // Vytvorim menu filtrovania

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            // Zakladne funkcie
            IToolStrip.CreateSeparator(pParent, true);
            if (FItems.CanRenameItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COPY, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MOVE, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
            if (FItems.CanTrash) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MOVE_TO_TRASH, ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanDelete) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_DELETE, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanCreateFolder) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanChangeAttributes) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CHANGE_ATTRIBUTES, ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            // Shell
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_SHELL);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_COPY, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_CUT, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_PASTE, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PASTE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_PRINT, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(M2.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_WINDOWS_PROPERTIES, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Prikazy
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COMMANDS);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SHOW_CMD, ICmd.CMD_ID_FILE_EXPLORER_RUN_COMMAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.IsCDDevice)
            {
                IToolStrip.CreateSeparator(M2.DropDownItems, true);
                IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EJECT_CD_MEDIUM, ICmd.CMD_ID_FILE_EXPLORER_EJECT_CD_DEVICE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            }
            
            // Siet
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_MAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_MAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_UNMAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_UNMAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            M2.CreateSeparator();
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_SHARE_PATH, ICmd.CMD_ID_FILE_EXPLORER_SHARE_CURRENT_PATH, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_UNSHARE_PATH, ICmd.CMD_ID_FILE_EXPLORER_UNSHARE_CURRENT_PATH, ICmd.CMD_APP_TARGET_ACTIVE, P);

            switch (IFileSystem._GetPathType(FItems.CurrentPath))
            {
                case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM:
                case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM_ROOT:
                    {
                        IToolStrip.CreateSeparator(M1.DropDownItems);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_FOLDER_SIZE, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems);
                        if ((FItems.IsSourceForArchive) || (FItems.IsSourceForArchiveItem(I))) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COMPRESS, ICmd.CMD_ID_FILE_EXPLORER_COMPRESS, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_TEST_ARCHIVE, ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT_ARCHIVE, ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        if ((I != -1) && (FItems[I].IsFile) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SPLIT_FILES, ICmd.CMD_ID_FILE_EXPLORER_SPLIT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if (FItems.SelectedFilesCount > 1) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_JOIN_FILES, ICmd.CMD_ID_FILE_EXPLORER_JOIN_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_GENERATE_CHECKSUM, ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_VERIFY_CHECKSUM, ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.CanMakeShortcut) || (FItems.CanCloneFile))
                        {
                            IToolStrip.CreateSeparator(M1.DropDownItems, true);
                            if (FItems.CanMakeShortcut) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MAKE_LINK, ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (FItems.CanCloneFile) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLONE_FILE, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FILE_CLONE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }
                        if ((FItems.IsEncryptionSource) || (FItems.IsDecryptionSource))
                        {
                            IToolStrip.CreateSeparator(M1.DropDownItems, true);
                            if (FItems.IsEncryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ENCRYPT, ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (FItems.IsDecryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_DECRYPT, ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SEARCH, ICmd.CMD_ID_FILE_EXPLORER_SEARCH, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_RENAME_DEVICE, ICmd.CMD_ID_FILE_EXPLORER_RENAME_DEVICE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MULTI_RENAME_TOOL, ICmd.CMD_ID_FILE_EXPLORER_MULTI_RENAME_TOOL, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SPECIALTIES);
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXPORT_LIST_TO_FILE, ICmd.CMD_ID_FILE_EXPLORER_EXPORT_LIST_TO_FILE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        M2.CreateSeparator();
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NEW_EMPTY_FILE, ICmd.CMD_ID_FILE_EXPLORER_CREATE_EMPTY_FILE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NEW_FILE_FROM_CLIPBOARD, ICmd.CMD_ID_FILE_EXPLORER_CREATE_NEW_FILE_FROM_CLIPBOARD, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        M2.CreateSeparator();
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CREATE_FULL_LIST, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FULL_LIST, ICmd.CMD_APP_TARGET_ACTIVE, ICmd.CMD_PANEL_TARGET_ACTIVE);
                    } break;
                case IFileSystem.PATH_TYPE_SAMBA_COMPUTER_SHARE:
                case IFileSystem.PATH_TYPE_SAMBA_FILE_SYSTEM:
                    {
                        IToolStrip.CreateSeparator(M1.DropDownItems);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_FOLDER_SIZE, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems);
                        if ((FItems.IsSourceForArchive) || (FItems.IsSourceForArchiveItem(I))) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COMPRESS, ICmd.CMD_ID_FILE_EXPLORER_COMPRESS, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_TEST_ARCHIVE, ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT_ARCHIVE, ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        if ((I != -1) && (FItems[I].IsFile) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SPLIT_FILES, ICmd.CMD_ID_FILE_EXPLORER_SPLIT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if (FItems.SelectedFilesCount > 1) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_JOIN_FILES, ICmd.CMD_ID_FILE_EXPLORER_JOIN_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_GENERATE_CHECKSUM, ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_VERIFY_CHECKSUM, ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.CanMakeShortcut) || (FItems.CanCloneFile))
                        {
                            IToolStrip.CreateSeparator(M1.DropDownItems, true);
                            if (FItems.CanMakeShortcut) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MAKE_LINK, ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (FItems.CanCloneFile) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLONE_FILE, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FILE_CLONE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }
                        if ((FItems.IsEncryptionSource) || (FItems.IsDecryptionSource))
                        {
                            IToolStrip.CreateSeparator(M1.DropDownItems, true);
                            if (FItems.IsEncryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ENCRYPT, ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (FItems.IsDecryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_DECRYPT, ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SEARCH, ICmd.CMD_ID_FILE_EXPLORER_SEARCH, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MULTI_RENAME_TOOL, ICmd.CMD_ID_FILE_EXPLORER_MULTI_RENAME_TOOL, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SPECIALTIES);
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXPORT_LIST_TO_FILE, ICmd.CMD_ID_FILE_EXPLORER_EXPORT_LIST_TO_FILE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        M2.CreateSeparator();
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NEW_EMPTY_FILE, ICmd.CMD_ID_FILE_EXPLORER_CREATE_EMPTY_FILE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NEW_FILE_FROM_CLIPBOARD, ICmd.CMD_ID_FILE_EXPLORER_CREATE_NEW_FILE_FROM_CLIPBOARD, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        M2.CreateSeparator();
                        IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CREATE_FULL_LIST, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FULL_LIST, ICmd.CMD_APP_TARGET_ACTIVE, ICmd.CMD_PANEL_TARGET_ACTIVE);
                    } break;
            }

            // Koniec rozsirene funkcie

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_SMB_NETWORK</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_SMB_NETWORK(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1, M2;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            // Siet
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_MAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_MAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_UNMAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_UNMAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Koniec rozsirene funkcie

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_SMB_SHARES</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_SMB_SHARES(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1, M2;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            // Siet
            M2 = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_MAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_MAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M2.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_NETWORK_UNMAP_DRIVE, ICmd.CMD_ID_FILE_EXPLORER_UNMAP_NETWORK_DRIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Koniec rozsirene funkcie

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_GZIP_ARCHIVE</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_GZIP_ARCHIVE(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov

            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_TAR_ARCHIVE</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_TAR_ARCHIVE(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            IToolStrip.CreateSeparator(M1.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_FOLDER_SIZE, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_RAR_ARCHIVE</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_RAR_ARCHIVE(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            IToolStrip.CreateSeparator(M1.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_FOLDER_SIZE, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_CLOUD_ROOT</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_CLOUD_ROOT(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            // Koniec rozsirene funkcie

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_CloudDevices(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CLOUD).DropDownItems);

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_FTP</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_FTP(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela
            int I = ActiveItemIndex; // Aktivny zaznam

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            // Zakladne funkcie
            IToolStrip.CreateSeparator(pParent, true);
            if (FItems.CanRenameItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COPY, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MOVE, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
            if (FItems.CanTrash) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_MOVE_TO_TRASH, ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanDelete) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_DELETE, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanCreateFolder) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_APP_TARGET_ACTIVE, P);
            if (FItems.CanChangeAttributes) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_CHANGE_ATTRIBUTES, ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            if ((FItems.IsEncryptionSource) || (FItems.IsDecryptionSource))
            {
                IToolStrip.CreateSeparator(M1.DropDownItems, true);
                if (FItems.IsEncryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ENCRYPT, ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
                if (FItems.IsDecryptionSource) IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_DECRYPT, ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES, ICmd.CMD_APP_TARGET_ACTIVE, P);
            }

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_ZIP_ARCHIVE</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_ZIP_ARCHIVE(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent, true);
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXTRACT, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);

            // Rozsirene funkcie
            IToolStrip.CreateSeparator(pParent, true);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS);

            IToolStrip.CreateSeparator(M1.DropDownItems, true);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_FOLDER_SIZE, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_EXT_FUNCTIONS_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED, ICmd.CMD_APP_TARGET_ACTIVE, P);

            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Vytvorenie panel menu pre zoznam NODE_LIST_ID_VIRTUAL</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_NODE_LIST_ID_VIRTUAL(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_DEVICE_MENU, P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
            IToolStrip.CreateSeparator(pParent, true);

            IToolStripMenuItem M1;
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY);
            CreateMenu_ColumnVisibility(M1.DropDownItems); // Vytvorim menu zobrazovania stlpcov
            CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems); // Vytvorim menu triedenia

            IToolStrip.CreateSeparator(pParent, true);
            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia

            // Zakladne funkcie
            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination))
            {
                IToolStrip.CreateSeparator(pParent, true);
                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_COPY, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
            }
        }

        /// <summary>Vytvorenie podmenu - historia expandovania</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_ExpandHistory(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            int C = IApp.GlobalData.FileExplorer_ExpandHistory.Count;
            string CP = FItems.CurrentPath; // Aktualna cesta
            
            for (int i = C - 1; i >= 0; i--)
            {
                string S = IApp.GlobalData.FileExplorer_ExpandHistory[i]; // Ziskam cestu z historie
                IToolStripMenuItem M = IToolStrip.CreateMenuItem(pParent, S, Event_MenuItemClick_ExpandHistory); // Vytvorim polozku
                M.Checked = S == CP; M.Tag = S; // Ulozim cestu
            }
            
            IToolStrip.CreateSeparator(pParent, true);
            IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HISTORY_CLEAR, Event_MenuItemClick_ExpandHistoryClear);
        }
        /// <summary>Vytvorenie podmenu - spatna navigacia</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_BackNavigation(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            string P = FItems.CurrentPath;
            IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_BACK_NAVIGATION_ROOT, Event_MenuItemClick_ExpandHistory).Tag = "";

            int D = IFileSystem.GetPathDepth(P);
            if (D < 2) return;

            IToolStrip.CreateSeparator(pParent);
            for (int i = 1; i < D; i++)
            {
                string P1 = IFileSystem.ExtractSubpath(P, i);
                IToolStrip.CreateMenuItem(pParent, P1, Event_MenuItemClick_ExpandHistory).Tag = P1;
            }
        }
        /// <summary>Vytvorenie podmenu - casto pouzivane priecinky</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_HotPaths(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HOT_PATHS_ADD, Event_MenuItemClick_HotPathsAdd); // Menu pridanie
            if (IApp.GlobalData.FileExplorer_HotPaths.Count == 0) return;

            IToolStrip.CreateSeparator(pParent);
            for (int i = 0; i < IApp.GlobalData.FileExplorer_HotPaths.Count; i++) // Menu pre otvorenie zaznamov
            {
                IToolStrip.CreateMenuItem(pParent, IApp.GlobalData.FileExplorer_HotPaths.GetName(i), Event_MenuItemClick_HotPathsOpen).Tag = i;
            }

            IToolStrip.CreateSeparator(pParent);
            IToolStripMenuItem M = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HOT_PATHS_DELETE); // Podmenu vymazanie
            for (int i = 0; i < IApp.GlobalData.FileExplorer_HotPaths.Count; i++) // Polozky menu pre vymazanie jednotlivcov
            {
                IToolStrip.CreateMenuItem(M.DropDownItems, IApp.GlobalData.FileExplorer_HotPaths.GetName(i), Event_MenuItemClick_HotPathsDelete).Tag = i;
            }
            IToolStrip.CreateSeparator(M.DropDownItems);
            IToolStrip.CreateMenuItem(M.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HOT_PATHS_CLEAR, Event_MenuItemClick_HotPathsClear); // Vymazanie vsetkych

        }
        /// <summary>Vytvorenie podmenu - filtrovanie</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_FilterItems(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            IToolStripMenuItem M; int CurrF = FParams.GetParam("CFM", INodeFilters.PREDDEFINED_ID_ALL);

            M = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_ALL, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_ALL; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_ALL;
            IToolStrip.CreateSeparator(pParent);

            IToolStripMenuItem M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_PREDEFINED);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_DIRS, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_DIR; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_DIR;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_TEXT, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_TEXT; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_TEXT;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_DATA, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_DATA; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_DATA;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_AUDIO, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_AUDIO; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_AUDIO;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_VIDEO, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_VIDEO; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_VIDEO;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_3D_IMAGE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_3D_IMAGE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_3D_IMAGE;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_RASTER_IMAGE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_RASTER_IMAGE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_RASTER_IMAGE;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_VECTOR_IMAGE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_VECTOR_IMAGE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_VECTOR_IMAGE;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_PAGE_LAYOUT, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_PAGE_LAYOUT; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_PAGE_LAYOUT;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_SPREAD_SHEET, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_SPREAD_SHEET; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_SPREAD_SHEET;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_DATABASE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_DATABASE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_DATABASE;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_GAME, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_GAME; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_GAME;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_CAD, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_CAD; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_CAD;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_GIS, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_GIS; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_GIS;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_WEB, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_WEB; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_WEB;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_EXE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_EXE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_EXE;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_PLUGIN, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_PLUGIN; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_PLUGIN;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_FONT, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_FONT; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_FONT;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_SYSTEM, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_SYSTEM; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_SYSTEM;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_SETTINGS, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_SETTINGS; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_SETTINGS;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_BACKUP, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_BACKUP; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_BACKUP;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_ENCODED, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_ENCODED; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_ENCODED;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_ARCHIVES, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_COMPRESSED; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_COMPRESSED;
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_DISK_IMAGE, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_DISK_IMAGE; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_DISK_IMAGE;
            IToolStrip.CreateSeparator(M1.DropDownItems);
            M = IToolStrip.CreateMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_DEVEL, Event_MenuItemClick_ChangeFilter); M.Tag = INodeFilters.PREDDEFINED_ID_DEVEL; M.Checked = CurrF == INodeFilters.PREDDEFINED_ID_DEVEL;

            IToolStrip.CreateSeparator(pParent);
            M = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_FILTER_ITEMS_CUSTOM, Event_MenuItemClick_ChangeFilter); M.Tag = -1; M.Checked = CurrF == -1;
        }
        /// <summary>Vytvorenie podmenu - oznacovanie</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_Selection(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            pParent.Clear(); // Zrusim aktualny obsah

            int PanelPos = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_INVERT_ACTIVE, ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(pParent);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SELECT_ALL, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_DESELECT_ALL, ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_INVERT_ALL, ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(pParent);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SELECT_ALL_DIRS, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_DIRS, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_DESELECT_ALL_DIRS, ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_DIRS, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_INVERT_ALL_DIRS, ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_DIRS, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(pParent);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SELECT_ALL_FILES, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_FILES, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_DESELECT_ALL_FILES, ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_FILES, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_INVERT_ALL_FILES, ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_FILES, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(pParent);

            IToolStripMenuItem M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_EXT, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_EXT, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_EXT, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_EXT, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(M1.DropDownItems);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_NAME, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_NAME, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_NAME, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_NAME, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(M1.DropDownItems);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_SAME, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_SAME, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_OTHER, ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_OTHER, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);

            IToolStrip.CreateSeparator(pParent);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_FILE);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_FILE_SAVE, ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_SAVE, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_FILE_LOAD, ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_LOAD, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD_FILES, ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FILES, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD_FULL_FILES, ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FULL_FILES, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD_PATH, ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_PATH, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(M1.DropDownItems);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD_SAVE, ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_SAVE, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateCMDMenuItem(M1.DropDownItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_CLIPBOARD_LOAD, ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_LOAD, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);

            IToolStrip.CreateSeparator(pParent);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_HIDE_SELECTION, ICmd.CMD_ID_FILE_EXPLORER_SELECT_HIDE_SELECTION, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
            IToolStrip.CreateSeparator(pParent);
            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT_BY_FILTER, ICmd.CMD_ID_FILE_EXPLORER_SELECT_BY_FILTER, ICmd.CMD_APP_TARGET_ACTIVE, PanelPos);
        }
        /// <summary>Vytvorenie podmenu - zabudovane menu polozky</summary>
        /// <param name="pParent">rodicovska kolekcia</param>
        protected void CreateMenu_ItemMenu(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            pParent.Clear(); // Zrusim aktualny obsah

            IToolStripMenuItem M1;
            int P = ParentPanel.GetPanelPosition(this); // Ziskam poziciu panela

            // Cast menu pre aktualnu polozku

            int I = ActiveItemIndex;
            if (I != -1)
            {
                M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_9_1); M1.Enabled = false; M1.Font = new System.Drawing.Font(M1.Font, System.Drawing.FontStyle.Bold); M1.BackColor = System.Drawing.Color.WhiteSmoke;
                IToolStrip.CreateSeparator(pParent, true);

                INode N = FItems[I];
                switch (N.ID)
                {
                    case INode.NODE_ID_FTP_CONNECTION:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_1, ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_FTP_ITEM:
                        {
                            if (N.IsDirectory)
                            {
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_6, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateSeparator(pParent);
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_2, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_11, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if (FItems.CanDeleteItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_8, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            }
                            else
                            {
                                if (FItems.CanNodeExpand(I))
                                {
                                    IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_6_1, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                    IToolStrip.CreateSeparator(pParent);
                                }
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13_1, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_1, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_10, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if (FItems.CanDeleteItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_7, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            }
                        } break;
                    case INode.NODE_ID_RAR_ITEM:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_1, ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_TAR_ITEM:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_1, ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_GZIP_ITEM:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_1, ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                            if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_1, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_BACK_ITEM:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_1, ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_LOCAL_DRIVE:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_2, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_SMB_ROOT:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_3, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_SMB_COMPUTER:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_4, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_SMB_SHARE:
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_5, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        } break;
                    case INode.NODE_ID_LOCAL_ITEM:
                        {
                            if (N.IsDirectory)
                            {
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_6, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_8, ICmd.CMD_ID_FILE_EXPLORER_FORCE_OPEN, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateSeparator(pParent);
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_2, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_11, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if (FItems.CanTrashItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_4, ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (FItems.CanDeleteItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_8, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            }
                            else
                            {
                                if (FItems.CanNodeExpand(I))
                                {
                                    IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_6_1, ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                    IToolStrip.CreateSeparator(pParent);
                                }
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_7, ICmd.CMD_ID_FILE_EXPLORER_OPEN, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_15, ICmd.CMD_ID_FILE_EXPLORER_SHELL_OPEN_AS, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateSeparator(pParent);
                                IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13_1, ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if ((FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_1, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if ((FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_10, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (OppositePanel.FItems.IsCopyDestination) IToolStrip.CreateSeparator(pParent);
                                if (FItems.CanTrashItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_5, ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (FItems.CanDeleteItem(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_7, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                IToolStrip.CreateSeparator(pParent, true);
                                if (FItems.CanTestArchiveNode(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_16_1, ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                                if (FItems.CanExtractArchiveNode(I)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_17_1, ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            }

                            IToolStrip.CreateSeparator(pParent, true); // Shell menu polozky
                            M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10);
                            M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_1, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_3, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (N.IsFile) M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_8, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT_ACTIVE, ICmd.CMD_APP_TARGET_ACTIVE, P); // Print
                            M1.CreateSeparator();
                            M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_4, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        } break;
                }
            }

            // Cast menu pre aktualny zaznam a cestu

            switch (FItems.ID)
            {
                case INodeList.NODE_LIST_ID_CLOUD_ROOT:
                    {
                        IToolStrip.CreateSeparator(pParent, true);
                        M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_9_2); M1.Enabled = false; M1.Font = new System.Drawing.Font(M1.Font, System.Drawing.FontStyle.Bold); M1.BackColor = System.Drawing.Color.WhiteSmoke;
                        IToolStrip.CreateSeparator(pParent, true);
                        CreateMenu_CloudDevices(pParent);
                    } break;
                case INodeList.NODE_LIST_ID_FTP:
                    {
                        IToolStrip.CreateSeparator(pParent, true);
                        M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_9_2); M1.Enabled = false; M1.Font = new System.Drawing.Font(M1.Font, System.Drawing.FontStyle.Bold); M1.BackColor = System.Drawing.Color.WhiteSmoke;
                        IToolStrip.CreateSeparator(pParent, true);

                        if (FItems.CanSelect)
                        {
                            IToolStrip.CreateSeparator(pParent, true);
                            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia
                        }

                        IToolStrip.CreateSeparator(pParent, true);
                        if ((FItems.SelectedCount > 0) && (FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_3, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.SelectedCount > 0) && (FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_12, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.SelectedCount > 0) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateSeparator(pParent);
                        if ((FItems.SelectedCount > 0) && (FItems.CanDelete)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_9, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        IToolStrip.CreateSeparator(pParent, true);
                        if (FItems.CanCreateFolder) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_12, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        IToolStrip.CreateSeparator(pParent, true);
                        IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
                    } break;
                case INodeList.NODE_LIST_ID_ROOT:
                    {
                        IToolStrip.CreateSeparator(pParent, true);
                        M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_9_2); M1.Enabled = false; M1.Font = new System.Drawing.Font(M1.Font, System.Drawing.FontStyle.Bold); M1.BackColor = System.Drawing.Color.WhiteSmoke;
                        IToolStrip.CreateSeparator(pParent, true);

                        IToolStrip.CreateSeparator(pParent, true);
                        IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
                    } break;
                case INodeList.NODE_LIST_ID_LOCAL_ITEMS:
                    {
                        IToolStrip.CreateSeparator(pParent, true);
                        M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_9_2); M1.Enabled = false; M1.Font = new System.Drawing.Font(M1.Font, System.Drawing.FontStyle.Bold); M1.BackColor = System.Drawing.Color.WhiteSmoke;
                        IToolStrip.CreateSeparator(pParent, true);

                        if (FItems.CanSelect)
                        {
                            IToolStrip.CreateSeparator(pParent, true);
                            CreateMenu_Selection(IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_SELECT).DropDownItems); // Vytvorim menu oznacenia
                        }

                        IToolStrip.CreateSeparator(pParent, true);
                        if ((FItems.SelectedCount > 0) && (FItems.IsCopySource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_3, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.SelectedCount > 0) && (FItems.IsMoveSource) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_12, ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.SelectedCount > 0) && (OppositePanel.FItems.IsCopyDestination)) IToolStrip.CreateSeparator(pParent);
                        if ((FItems.SelectedCount > 0) && (FItems.CanTrash)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_6, ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_SELECTED, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        if ((FItems.SelectedCount > 0) && (FItems.CanDelete)) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_14_9, ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        IToolStrip.CreateSeparator(pParent, true);
                        if (FItems.CanCreateFolder) IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_12, ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        IToolStrip.CreateSeparator(pParent, true);
                        if (FItems.GetCountOfSelectedFullNames_ArchivesSupportTest() > 0)
                        {
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_16_2, ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_SELECTED, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_17_2, ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_SELECTED, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }

                        IToolStrip.CreateSeparator(pParent, true); // Shell menu polozky
                        M1 = IToolStrip.CreateMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10);
                        if (FItems.SelectedCount > 0)
                        {
                            if (FItems.CanShellCopy) M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_5, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if (FItems.CanShellCut) M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_6, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT, ICmd.CMD_APP_TARGET_ACTIVE, P);
                            if ((FItems.CanShellPrint) && (FItems.SelectedFilesCount > 0)) M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_9, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        }
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        if (FItems.CanShellPaste) M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_2, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PASTE, ICmd.CMD_APP_TARGET_ACTIVE, P);
                        IToolStrip.CreateSeparator(M1.DropDownItems, true);
                        M1.CreateCMDMenuItem(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_10_7, ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES_PATH, ICmd.CMD_APP_TARGET_ACTIVE, P);

                        IToolStrip.CreateSeparator(pParent, true);
                        IToolStrip.CreateCMDMenuItem(pParent, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_RELOAD, ICmd.CMD_ID_FILE_EXPLORER_RELOAD, ICmd.CMD_APP_TARGET_ACTIVE, P);
                    } break;
            }
        }

        /// <summary>Event: OnGetItemData</summary>
        /// <param name="pIndex">riadok</param>
        /// <param name="pFocused">priznak kurzora</param>
        /// <param name="Strings">retazce na zobrazenie</param>
        /// <param name="pItemStyle">styl zobrazenia</param>
        /// <param name="pImageIndex">pozicia ikony</param>
        protected void Event_OnGetItemData(int pIndex, bool pFocused, ref string[] Strings, IVisualStyle pItemStyle, ref int pImageIndex)
        {
            INode N = FItems[pIndex]; // Ziskam node
            if (N != null) // Je platny?
            {
                //N.DisplayStrings = new string[10];
                FItems.CreateDisplayStrings(N); // Vytvorim texty
                for (int i = 0; i < N.DisplayStrings.Length; i++)
                {
                    if (i >= Strings.Length) break;
                    int I = FItems.TranslateVisibilityIndex(i); // Prevediem na fyzicky index
                    Strings[i] = string.IsNullOrEmpty(N.DisplayStrings[I]) ? "" : N.DisplayStrings[I];
                }
            }
            switch (IApp.Settings.FileExplorer_DisplayIconMode)
            {
                case 1:
                case 2:
                case 3:
                    {
                        switch (N.ID)
                        {
                            case INode.NODE_ID_BACK_ITEM: // back polozku nebudem extrahovat
                                {
                                    pImageIndex = N.DefaultImageIndex;
                                } break;
                            default:
                                {
                                    if (N.ImageIndex != -1) pImageIndex = N.ImageIndex;
                                    else
                                    {
                                        FIconExtractor.Add(N);
                                        pImageIndex = N.DefaultImageIndex;
                                    }
                                } break;
                        }
                    } break;
                default:
                    {
                        pImageIndex = N.DefaultImageIndex;
                    } break;
            }

            pItemStyle.Assign(IApp.CurrentVisualTheme.FileExplorer_List_DefaultItem);
            if (N.IsDirectory) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_Directory);
            if (N.IsFile) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_File);
            if (N.HasArchiveAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_ArchiveItem);
            if (N.HasReadOnlyAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_ReadOnlyItem);
            if (N.HasHiddenAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_HiddenItem);
            if (N.HasSystemAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_SystemItem);
            if (N.HasEncryptedAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_EncryptedItem);
            if (N.HasCompressedAttr) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_CompressedItem);
            if (N.Selected) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_SelectedItem);
            if (pFocused) pItemStyle.Combine(IApp.CurrentVisualTheme.FileExplorer_List_Cursor);

        }
        /// <summary>Event: ColumnWidthChanged</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ColumnWidthChanged(object pSender, System.Windows.Forms.ColumnWidthChangedEventArgs e)
        {
            if (!FList.InternalUpdate)
            {
                FItems.SetVisibleColumnWidth(e.ColumnIndex, FList.Columns[e.ColumnIndex].Width); // Ulozim zmenenu dlzku
                SaveNodeListParams();
            }
        }
        /// <summary>Event: GotFocus pre FList</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_GotFocus(object pSender, EventArgs e)
        {
            ParentPanel.ChangeActivePanel(this); // Zmenim aktivny panel
        }
        /// <summary>Event: ItemActivate pre FList</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ItemActivate(object pSender, EventArgs e)
        {
            long L = DateTime.Now.Ticks;
            if (L - FLastListUpdated < 33 * 10 * 1000) // Zabranim prilis castej aktualizacii
            {
                FList.Invalidate();
                return;
            }
            ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_EXPAND, ICmd.CMD_APP_TARGET_ACTIVE, ICmd.CMD_PANEL_TARGET_ACTIVE); // Vykonam expandovanie
        }
        /// <summary>Event: Click pre horny a dolny status</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_StatusClick(object pSender, EventArgs e)
        {
            ParentPanel.ChangeActivePanel(this); // Zmeni aktivny panel
        }
        /// <summary>Event: Click na polozku menu 'Viditelnost stlpca'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_ColumnVisibility(object pSender, EventArgs e)
        {
            int Col = ICore.ToInt(((IToolStripMenuItem)pSender).Tag); // Ziskam cislo stlpca
            InvertColumnVisibility(Col); // Volam preklopenie viditelnosti
        }
        /// <summary>Event: Opening pre FList.ContextMenuStrip</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ContentMenuOpening(object pSender, System.ComponentModel.CancelEventArgs e)
        {
            System.Drawing.Point P = System.Windows.Forms.Cursor.Position;
            P = FList.PointToClient(P); // Prevediem na klienta
            System.Windows.Forms.ToolStripItemCollection pItems = ((System.Windows.Forms.ContextMenuStrip)pSender).Items;

            if (!FList.IsHeaderPoint(P)) // Nie je to klik na header?
            {
                if (FDisplayInternalItemMenu)
                {
                    CreateMenu_ItemMenu(pItems);
                }
                else e.Cancel = true; 
            }
            else
            {
                pItems.Clear(); // Vytvorim content menu pre header
                CreateMenu_ColumnVisibility(IToolStrip.CreateMenuItem(pItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_COLUMNS_VISIBILITY).DropDownItems);
                if (FItems.CanSort) CreateMenu_SortingItems(IToolStrip.CreateMenuItem(pItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_PANEL_MENU_SORT_ITEMS).DropDownItems);
            }
        }
        /// <summary>Event: ColumnClick</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ColumnClick(object pSender, System.Windows.Forms.ColumnClickEventArgs e)
        {
            ChangeSortColumn(e.Column); // Volam zmenu
        }
        /// <summary>Event: Click na polozku menu 'Triedenie zaznamov'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_SortingItems(object pSender, EventArgs e)
        {
            int Col = ICore.ToInt(((IToolStripMenuItem)pSender).Tag); // Ziskam cislo stlpca
            ChangeSortColumn(Col); // Volam zmenu triedenia
        }
        /// <summary>Event: OnClick pre polozku 'Device menu'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_DeviceMenuItemClick(object pSender, EventArgs e)
        {
            string Path = ICore.ToStr(((IToolStripMenuItem)pSender).Tag); // Ziskam cestu polozky
            string Path2 = OppositePanel.FItems.CurrentPath; // Ziskam cestu oppacneho panela

            if (string.Compare(IFileSystem.ExtractDeviceRoot(Path), IFileSystem.ExtractDeviceRoot(Path2), true) == 0) // Su root cest rovnake?
            {
                if (Go(Path2, false, true, OppositePanel.ActiveKeyValue))
                {
                    ActivatePanel(); // Aktivujem panel
                    return; // Skusim expandovat presne tam kde je opacny panel
                }
            }
            Go(Path, false, false); // Expandujem v roote
            ActivatePanel(); // Aktivujem panel
        }
        /// <summary>Event: Opening pre HistoryMenu</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_HistoryContentMenuOpening(object pSender, System.ComponentModel.CancelEventArgs e)
        {
            System.Windows.Forms.ToolStripItemCollection pItems = ((System.Windows.Forms.ContextMenuStrip)pSender).Items;
            pItems.Clear(); // Vytvorim content menu pre header

            CreateMenu_ExpandHistory(IToolStrip.CreateMenuItem(pItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HISTORY).DropDownItems); // Vytvorim menu historie
            IToolStrip.CreateSeparator(pItems, true);
            CreateMenu_BackNavigation(IToolStrip.CreateMenuItem(pItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_BACK_NAVIGATION).DropDownItems); // Vytvorim menu spatnej navigacie
            IToolStrip.CreateSeparator(pItems, true);
            CreateMenu_HotPaths(IToolStrip.CreateMenuItem(pItems, lang.MENU_ITEM_TEXT_FILE_EXPLORER_HOT_PATHS).DropDownItems); // Vytvorim menu casto pouzivane priecinky
        }
        /// <summary>Event: Click na polozku menu 'Historia expandovania'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_ExpandHistory(object pSender, EventArgs e)
        {
            string P = ICore.ToStr(((IToolStripMenuItem)pSender).Tag); // Ziskam cestu
            if (P == FItems.CurrentPath) return; // Je cesta rovnaka ako aktualna?

            string K = "";
            if (IFileSystem.IsSubpath(FItems.CurrentPath, P))
            {
                K = IFileSystem.ExtractName(IFileSystem.ExtractSubpath(FItems.CurrentPath, IFileSystem.GetPathDepth(P) + 1)).ToLower();
            }

            if (Go(P, false, false, K)) ActivatePanel(); // Expandujem
        }
        /// <summary>Event: Click na polozku menu 'Vymazat historia expandovania'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_ExpandHistoryClear(object pSender, EventArgs e)
        {
            IApp.GlobalData.FileExplorer_ExpandHistory.Clear();
        }
        /// <summary>Event: Click na polozku menu 'Zaradenie do hot paths'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_HotPathsAdd(object pSender, EventArgs e)
        {
            string N = "";
            if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_6_1, lang.FILE_EXPLORER_TEXT_6_2, ref N, 64, false, "FILE_EXPLORER_HOT_PATHS")) return;

            int Choice = 0;
            if (ParentPanel.IsDualPanelMode)
            {
                if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_6_1, lang.FILE_EXPLORER_TEXT_6_3, lang.FILE_EXPLORER_TEXT_6_4, lang.FILE_EXPLORER_TEXT_6_5, ref Choice)) return;
            }

            switch (Choice)
            {
                case 1: IApp.GlobalData.FileExplorer_HotPaths.Add(N, FItems.CurrentPath, OppositePanel.FItems.CurrentPath, IApp.GlobalData.GetHotPathConnectionProvider(FItems.ConnectionProvider), IApp.GlobalData.GetHotPathConnectionProvider(OppositePanel.FItems.ConnectionProvider)); break;
                default: IApp.GlobalData.FileExplorer_HotPaths.Add(N, FItems.CurrentPath, null, IApp.GlobalData.GetHotPathConnectionProvider(FItems.ConnectionProvider), null); break;
            }
        }
        /// <summary>Event: Click na polozku menu 'Otvorenie hot paths'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_HotPathsOpen(object pSender, EventArgs e)
        {
            int I = ICore.ToInt(((IToolStripMenuItem)pSender).Tag);
            string P1 = IApp.GlobalData.FileExplorer_HotPaths.GetPath1(I); // Ziskam cesty
            string P2 = IApp.GlobalData.FileExplorer_HotPaths.GetPath2(I);
            int CP1 = IApp.GlobalData.GetConnProviderFromHotPathConnProvider(IApp.GlobalData.FileExplorer_HotPaths.GetConnProvider1(I));
            int CP2 = IApp.GlobalData.GetConnProviderFromHotPathConnProvider(IApp.GlobalData.FileExplorer_HotPaths.GetConnProvider2(I));

            if (P1 != null) Go(P1, false, false, "", true, true, CP1);
            if ((P2 != null) && (ParentPanel.IsDualPanelMode)) OppositePanel.Go(P2, false, false, "", true, true, CP2);
            ActivatePanel(); // Aktivovanie panela
        }
        /// <summary>Event: Click na polozku menu 'Vycistenie hot paths'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_HotPathsClear(object pSender, EventArgs e)
        {
            if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_6_6)) return; // Potvrdim
            IApp.GlobalData.FileExplorer_HotPaths.Clear();
        }
        /// <summary>Event: Click na polozku menu 'Vymazanie hot paths'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_HotPathsDelete(object pSender, EventArgs e)
        {
            int I = ICore.ToInt(((IToolStripMenuItem)pSender).Tag); // Pozicia
            if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_6_7, IApp.GlobalData.FileExplorer_HotPaths.GetName(I)))) return; // Potvrdim mazanie
            IApp.GlobalData.FileExplorer_HotPaths.Delete(I); // Zmazem
        }
        /// <summary>Event: Click na tlacidlo - zobrazit zoznam zariadeni</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnClick_DevicesMenu(object pSender, EventArgs e)
        {
            int P = ParentPanel.GetPanelPosition(this);
            ExecCMD(P == ICmd.CMD_PANEL_TARGET_LEFT ? ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL : ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL, ICmd.CMD_APP_TARGET_ACTIVE, P);
        }
        /// <summary>Event: Click na tlacidlo - prejst na root zariadenia</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnClick_DeviceRoot(object pSender, EventArgs e)
        {
            ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICE_ROOT, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this));
        }
        /// <summary>Event: Click na tlacidlo - prejst na vyssiu uroven</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_BtnClick_GoBack(object pSender, EventArgs e)
        {
            ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this));
        }
        /// <summary>Event: Click na polozku menu 'Zmena filtra'</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_MenuItemClick_ChangeFilter(object pSender, EventArgs e)
        {
            int I = ICore.ToInt(((IToolStripMenuItem)pSender).Tag);
            if ((I != -1) && (I == FParams.GetParam("CFM", INodeFilters.PREDDEFINED_ID_ALL))) return; // Ziadna zmena

            if (I == -1) // Vlastny filter?
            {
                INodeFilters F = new INodeFilters(); F.Deserialize(FParams.GetParam("CF", "")); // Nacitam filter
                if (!F.EditWithForm(lang.FILE_EXPLORER_TEXT_8)) return; // Editujem
                FParams.SetParam("CF", F.Serialize()); // Ulozim
            }

            FParams.SetParam("CFM", I); // Ulozim novy druh filtra
            Reload(); // Znovu nacitam obsah
        }
        /// <summary>Event: MouseDown pre FList</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ListMouseDown(object pSender, System.Windows.Forms.MouseEventArgs e)
        {
            if ((e.Button & System.Windows.Forms.MouseButtons.Left) != 0) // Bolo kliknute lave tlacidlo?
            {
                IListViewItem LI = (IListViewItem)FList.GetItemAt(e.X, e.Y);
                int I = LI == null ? -1 : LI.Index;
                if (I != -1) // Je pod kurzorom nejaka polozka?
                {
                    if (IApp.App.IsCtrlPressed) // Je stlacene ctrl?
                    {
                        FItems.SelectItem(I, !FItems.GetNodeSelection(I)); // Preklopim oznacenie
                        FList.RedrawItems(I, I, false); // Prekreslim
                        UpdateStatuses();
                        return;
                    }
                    if (IApp.App.IsShiftPressed) // Je stlaceny shift?
                    {
                        int I1 = ActiveItemIndex; // Aktualnu polozku
                        if (I1 == -1) return;
                        if (I1 < I)
                        {
                            for (int i = I1; i <= I; i++)
                            {
                                FItems.SelectItem(i, !FItems.GetNodeSelection(i)); // Preklopim oznacenie
                            }
                            FList.RedrawItems(I1, I, false); // Prekreslim
                            UpdateStatuses();
                            return;
                        }
                        else
                        {
                            for (int i = I1; i >= I; i--)
                            {
                                FItems.SelectItem(i, !FItems.GetNodeSelection(i)); // Preklopim oznacenie
                            }
                            FList.RedrawItems(I, I1, false); // Prekreslim
                            UpdateStatuses();
                            return;
                        }
                    }
                }
            }

            if ((e.Button & System.Windows.Forms.MouseButtons.Right) != 0) // Bolo kliknute prave tlacidlo?
            {
                int MenuMode = IApp.Settings.FileExplorer_ShowItemMenuMode; // Urcim, ktore menu sa zobrazi
                if (IApp.App.IsCtrlPressed) MenuMode ^= 1;
                FDisplayInternalItemMenu = MenuMode == 0;
            }
        }
        /// <summary>Event: MouseDown pre FList</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ListMouseUp(object pSender, System.Windows.Forms.MouseEventArgs e)
        {
            if ((e.Button & System.Windows.Forms.MouseButtons.Right) != 0) // Bolo kliknute lave tlacidlo?
            {
                if (!FDisplayInternalItemMenu)
                {

                    System.Collections.Generic.List<string> L;
                    if (FItems.SelectedCount == 0)
                    {
                        L = new System.Collections.Generic.List<string>(); // Zoznam objektov

                        IListViewItem LI = (IListViewItem)FList.GetItemAt(e.X, e.Y); // Urcim polozku pod kurzorom
                        int I = LI == null ? -1 : LI.Index;
                        
                        if (I != -1)
                        {
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        }
                        else
                        {
                            L.Add(FItems.CurrentPath); // Zaradim aktualnu cestu
                        }
                    }
                    else
                    {
                        L = FItems.GetListOfSelectedFullNames();
                    }
                    System.Drawing.Point P = PointToScreen(e.Location);
                    IShellContextMenu.InvokeShowShellContextMenu(IApp.AppForm.Handle, L, P.X, P.Y); // Zobrazim menu
                    L.Clear(); L = null; // Zrusim zoznam
                }
            }
        }
        /// <summary>Event: Tick pre FTimer</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_TimerTick(object pSender, EventArgs e)
        {
            FTimer.Enabled = false; // Zakazem timer

            if (IApp.Settings.FileExplorer_AutoReloadAfterChange)
            {
                if (FItems.WasChanged)
                {
                    Reload();
                    return;
                }
            }

            FTimer.Enabled = true; // Povolim timer
        }
        /// <summary>Event: KeyPress pre FList a rychle hladanie</summary>
        /// <param name="pSender"></param>
        /// <param name="e"></param>
        protected void Event_KeyPress_FListQuickFind(object pSender, System.Windows.Forms.KeyPressEventArgs e)
        {
            switch (e.KeyChar)
            {
                case '?':
                case '*':
                case '.':
                    {
                        FQuickFindValue += e.KeyChar.ToString();
                        UpdateQuickFind();
                    } break;
            }
            e.Handled = true;
            return;
        }
        /// <summary>Event: KeyDown pre FList a mod rychleho hladania</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_KeyDown_FListQuickFind(object pSender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
            {
                e.SuppressKeyPress = true;
                e.Handled = true;
                StopQuickFind();
                return;
            }
            if (e.KeyCode == System.Windows.Forms.Keys.Enter)
            {
                e.SuppressKeyPress = true;
                e.Handled = true;
                AcceptQuickFind();
                return;
            }

            switch (e.KeyCode)
            {
                case System.Windows.Forms.Keys.A:
                case System.Windows.Forms.Keys.B:
                case System.Windows.Forms.Keys.C:
                case System.Windows.Forms.Keys.D:
                case System.Windows.Forms.Keys.E:
                case System.Windows.Forms.Keys.F:
                case System.Windows.Forms.Keys.G:
                case System.Windows.Forms.Keys.H:
                case System.Windows.Forms.Keys.I:
                case System.Windows.Forms.Keys.J:
                case System.Windows.Forms.Keys.K:
                case System.Windows.Forms.Keys.L:
                case System.Windows.Forms.Keys.M:
                case System.Windows.Forms.Keys.N:
                case System.Windows.Forms.Keys.O:
                case System.Windows.Forms.Keys.P:
                case System.Windows.Forms.Keys.Q:
                case System.Windows.Forms.Keys.R:
                case System.Windows.Forms.Keys.S:
                case System.Windows.Forms.Keys.T:
                case System.Windows.Forms.Keys.U:
                case System.Windows.Forms.Keys.V:
                case System.Windows.Forms.Keys.W:
                case System.Windows.Forms.Keys.X:
                case System.Windows.Forms.Keys.Y:
                case System.Windows.Forms.Keys.Z:
                    {
                        FQuickFindValue += e.KeyCode.ToString().ToLower();
                        UpdateQuickFind();
                    } break;
                case System.Windows.Forms.Keys.Back:
                    {
                        if (FQuickFindValue.Length > 0) FQuickFindValue = FQuickFindValue.Substring(0, FQuickFindValue.Length - 1);
                        UpdateQuickFind();
                    } break;
                case System.Windows.Forms.Keys.Up:
                case System.Windows.Forms.Keys.Down:
                case System.Windows.Forms.Keys.Left:
                case System.Windows.Forms.Keys.Right:
                    {
                        e.Handled = false;
                        return;
                    }
                default:
                    {
                        return;
                    }
            }
            e.SuppressKeyPress = true;
            e.Handled = true;
            return;
        }
        /// <summary>Event: MouseMove pre FList</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_ListMouseMove(object pSender, System.Windows.Forms.MouseEventArgs e)
        {
            if (IApp.Settings.FileExplorer_ItemToolTipMode > 0)
            {
                FListToolTip.Active = true;
                IListViewItem LI = (IListViewItem)FList.GetItemAt(e.X, e.Y); // Ziskam polozku pod kurzorom
                if (LI == null)
                {
                    FListToolTip.RemoveAll();
                    return; // Ziadna
                }
            }
            else
            {
                FListToolTip.Active = false;
            }
        }
        /// <summary>Event: ItemMouseHover pre ListView</summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Event_ItemMouseHover(object sender, System.Windows.Forms.ListViewItemMouseHoverEventArgs e)
        {
            if (IApp.Settings.FileExplorer_ItemToolTipMode == 0) // Nema sa zobrazovat tooltip?
            {
                FListToolTip.RemoveAll();
                return;
            }

            if (ICore.ToInt(FListToolTip.Tag) == e.Item.Index) return; // Je uz tip zobrazeny?

            string S = CreateItemToolTip(e.Item.Index); // Vytvorim tooltip
            FListToolTip.Tag = e.Item.Index;
            e.Item.ToolTipText = S;
            FListToolTip.SetToolTip(FList, S); // Zobrazim
        }
        /// <summary>Event: DragEnter</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_DragEnter(object pSender, System.Windows.Forms.DragEventArgs e)
        {
            if (FItems.IsCopyDestination)
            {
                if (e.Data.GetDataPresent("totalem_file_explorer_drag_drop"))
                {
                    IDragAndDropInfo Data = (IDragAndDropInfo)e.Data.GetData("totalem_file_explorer_drag_drop");
                    if (Data.SourcePanel == this) // Rovnaky panel ako zdroj?
                    {
                        e.Effect = System.Windows.Forms.DragDropEffects.None;
                        return;
                    }
                    e.Effect = System.Windows.Forms.DragDropEffects.Copy; // Prijimam
                    return;
                }
                if (e.Data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop))
                {
                    FCurrentAllowedDragDropEffects = e.AllowedEffect; // Ulozim moznosti
                    FCurrentDragDropItems = (string[])e.Data.GetData(System.Windows.Forms.DataFormats.FileDrop); // Ulozim zoznam
                    if ((FCurrentDragDropItems == null) || (FCurrentDragDropItems.Length == 0)) // Chyba?
                    {
                        e.Effect = System.Windows.Forms.DragDropEffects.None;
                        return;
                    }
                    e.Effect = System.Windows.Forms.DragDropEffects.Copy | System.Windows.Forms.DragDropEffects.Link | System.Windows.Forms.DragDropEffects.Move; // Prijimam
                    return;
                }
            }

            e.Effect = System.Windows.Forms.DragDropEffects.None;
            FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
        }
        /// <summary>Event: DragDrop</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_DragDrop(object pSender, System.Windows.Forms.DragEventArgs e)
        {
            if (e.Data.GetDataPresent("totalem_file_explorer_drag_drop"))
            {
                IDragAndDropInfo Data = (IDragAndDropInfo)e.Data.GetData("totalem_file_explorer_drag_drop");
                Data.SourcePanel.ExecCMD(Data.CMD_ID, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(Data.SourcePanel));
                return;
            }

            if (FCurrentAllowedDragDropEffects == System.Windows.Forms.DragDropEffects.None) return; // Ziadna povolena operacia?
            if (FCurrentDragDropItems == null) return;

            e.Effect = System.Windows.Forms.DragDropEffects.None;
            if (FCurrentDragDropItems.Length == 1)
            {
                int R = IFileSystem.GetObjectType(FCurrentDragDropItems[0]);
                if (R == IFileSystem.OBJECT_TYPE_FILE)
                {
                    R = 0;
                    IApp.AppForm.BringToFront();
                    if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, string.Format(lang.FILE_EXPLORER_TEXT_27_1, FCurrentDragDropItems[0]), lang.FILE_EXPLORER_TEXT_27_4, lang.FILE_EXPLORER_TEXT_27_5, ref R))
                    {
                        FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
                        FCurrentDragDropItems = null;
                        return;
                    }
                    switch (R)
                    {
                        case 2: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_LINK, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                        case 1: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_MOVE, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                        default: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_COPY, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                    }
                    return;
                }
                if (R == IFileSystem.OBJECT_TYPE_DIRECTORY)
                {
                    IApp.AppForm.BringToFront();
                    if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, string.Format(lang.FILE_EXPLORER_TEXT_27_2, FCurrentDragDropItems[0]), lang.FILE_EXPLORER_TEXT_27_4, lang.FILE_EXPLORER_TEXT_27_5, ref R))
                    {
                        FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
                        FCurrentDragDropItems = null;
                        return;
                    }
                    switch (R)
                    {
                        case 2: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_LINK, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                        case 1: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_MOVE, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                        default: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_COPY, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                    }
                    return;
                }

                FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
                FCurrentDragDropItems = null;
                return;
            }
            else
            {
                int R = 0;
                IApp.AppForm.BringToFront();
                if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, string.Format(lang.FILE_EXPLORER_TEXT_27_3, FCurrentDragDropItems.Length), lang.FILE_EXPLORER_TEXT_27_4, lang.FILE_EXPLORER_TEXT_27_5, ref R))
                {
                    FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
                    FCurrentDragDropItems = null;
                    return;
                }

                switch (R)
                {
                    case 2: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_LINK, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                    case 1: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_MOVE, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                    default: ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_COPY, ICmd.CMD_APP_TARGET_ACTIVE, ParentPanel.GetPanelPosition(this)); break;
                }
            }

        }
        /// <summary>Event: DragLeave</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void Event_DragLeave(object pSender, EventArgs e)
        {
            FCurrentAllowedDragDropEffects = System.Windows.Forms.DragDropEffects.None;
            FCurrentDragDropItems = null;
        }
        /// <summary>Event: ItemDrag</summary>
        /// <param name="pSender">zdroj</param>
        /// <param name="e">parameter</param>
        protected void FList_ItemDrag(object pSender, System.Windows.Forms.ItemDragEventArgs e)
        {
            System.Windows.Forms.DataObject Obj = new System.Windows.Forms.DataObject();
            if (!FItems.IsCopySource) return; // Nie je zdroj kopirovania?

            int DragItemIndex = ((IListViewItem)e.Item).Index;
            if (FItems.SelectedCount == 0)
            {
                if (!FItems.IsCopySourceItem(DragItemIndex)) return; // Polozka nie je copy mozna?
                if (FItems.IsDragAndDropSource) Obj.SetData(System.Windows.Forms.DataFormats.FileDrop, new string[] { FItems.GetNodeExpandPath(DragItemIndex) }); // Moze ist mimo porgram?
                Obj.SetData("totalem_file_explorer_drag_drop", new IDragAndDropInfo(this, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE)); // Interne copy
            }
            else
            {
                if (FItems[DragItemIndex].Selected)
                {
                    if (FItems.IsDragAndDropSource) Obj.SetData(System.Windows.Forms.DataFormats.FileDrop, ICore.StringList2StringArray(FItems.GetListOfSelectedFullNames())); // Moze ist mimo porgram?
                    Obj.SetData("totalem_file_explorer_drag_drop", new IDragAndDropInfo(this, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SELECTED)); // Interne copy
                }
                else
                {
                    if (!FItems.IsCopySourceItem(DragItemIndex)) return; // Polozka nie je copy mozna?
                    if (FItems.IsDragAndDropSource) Obj.SetData(System.Windows.Forms.DataFormats.FileDrop, new string[] { FItems.GetNodeExpandPath(DragItemIndex) }); // Moze ist mimo porgram?
                    Obj.SetData("totalem_file_explorer_drag_drop", new IDragAndDropInfo(this, ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE)); // Interne copy
                }
            }
            DoDragDrop(Obj, System.Windows.Forms.DragDropEffects.Copy | System.Windows.Forms.DragDropEffects.Move | System.Windows.Forms.DragDropEffects.Link);
        }

        /// <summary>Vytvorenie objektu</summary>
        public void Create()
        {
            // Horny status
            FUpStatus = new ISimpleStatusStrip(3, new string[] { "", "\\", ".." }, new EventHandler[] { Event_BtnClick_DevicesMenu, Event_BtnClick_DeviceRoot, Event_BtnClick_GoBack }); FUpStatus.Dock = System.Windows.Forms.DockStyle.Top; FUpStatus.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
            FUpStatus.Items[0].Image = core.Properties.Resources.main_icon.ToBitmap();
            FUpStatus.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; FUpStatus.ShowItemToolTips = true; IApp.CurrentVisualTheme.FileExplorer_UpStatus_InActive.Apply(FUpStatus); 
            FUpStatus.ContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(); FUpStatus.ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator());

            // Dolny status
            FDownStatus = new ISimpleStatusStrip(); FDownStatus.Dock = System.Windows.Forms.DockStyle.Bottom; FDownStatus.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
            IApp.CurrentVisualTheme.FileExplorer_DownStatus_InActive.Apply(FDownStatus);

            // Listview
            FList = new IVirtualListView(); FList.Dock = System.Windows.Forms.DockStyle.Fill; FList.FullRowSelect = true; FList.HideSelection = true;
            FList.ContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(); FList.ContextMenuStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator());
            IApp.CurrentVisualTheme.FileExplorer_List_DefaultItem.Apply(FList);
            FListToolTip = new IToolTip(); FListToolTip.InitialDelay = 1000; FListToolTip.ReshowDelay = 1000; FListToolTip.UseFading = false; FListToolTip.UseAnimation = false;
            FList.AllowDrop = true;

            // Nastavim eventy
            FList.GetItemData += Event_OnGetItemData; FList.ColumnWidthChanged += Event_ColumnWidthChanged; FList.GotFocus += Event_GotFocus;
            FList.ItemActivate += Event_ItemActivate;
            FUpStatus.Click += Event_StatusClick;
            FDownStatus.Click += Event_StatusClick;
            FList.ContextMenuStrip.Opening += Event_ContentMenuOpening;
            FList.ColumnClick += Event_ColumnClick;
            FUpStatus.ContextMenuStrip.Opening += Event_HistoryContentMenuOpening;
            FList.MouseDown += Event_ListMouseDown;
            FList.MouseUp += Event_ListMouseUp;
            FList.MouseMove += Event_ListMouseMove;
            FList.ItemMouseHover += Event_ItemMouseHover;
            FList.DragEnter += Event_DragEnter;
            FList.DragDrop += Event_DragDrop;
            FList.DragLeave += Event_DragLeave;
            FList.ItemDrag += FList_ItemDrag;
            FList.MouseLeave += (s, e) => // Event
            {
                FListToolTip.Active = false;
            };

            EnabledChanged += (s, e) =>
            {
                FList.Enabled = Enabled;
                FList.BackColor = IApp.CurrentVisualTheme.FileExplorer_List_DefaultItem.BackColor;
                FList.Invalidate(true);
            };

            Controls.AddRange(new System.Windows.Forms.Control[] { FList, FUpStatus, FDownStatus }); // Zaradim do controls

            FIconExtractor = new IIconExtactor(FList); // Vytvorim objekt extraktora ikoniek
        }
    
        /// <summary>Otvorenie cesty</summary>
        /// <param name="pPath">cesta</param>
        /// <param name="pUseDefaultIfFail">priznak pouzitia default cesty ak nacitanie zlyha</param>
        /// <param name="pSilentMode">priznak ticheho modu</param>
        /// <param name="pInitKeyValue">pociatocna key. hodnota</param>
        /// <param name="pCanReadFromCache">priznak moznosti citania z cache</param>
        /// <param name="pUpdateIcons">priznak aktualizacie ikoniek v threade</param>
        /// <param name="pConnectionProvider">poskytovatel spojenia</param>
        /// <returns>true / false</returns>
        public bool Go(string pPath, bool pUseDefaultIfFail = true, bool pSilentMode = false, string pInitKeyValue = "", bool pCanReadFromCache = true, bool pUpdateIcons = true, int pConnectionProvider = 0)
        {
            if (!ParentPanel.IsPanelVisible(this)) return false; // Nie je panel viditelny?

            BeginLoadContent(); // Zacinam load

            INodeList L = INodeList.CreateNodeList(pPath, pConnectionProvider); // Vytvorim objekt
            if (L == null) // Chyba?
            {
                if (!pUseDefaultIfFail) // Nepouzit default?
                {
                    if (!pSilentMode) // Zobrazit chybu?
                    {
                        IApp.ShowError(lang.FILE_EXPLORER_TEXT_3);
                    }
                    CancelLoadContent(); // Zrusenie load
                    return false;
                }
                L = INodeList.CreateNodeList(""); // Vytvorim default
            }

            SaveNodeListParams(); // Ulozim parametre
            INodeList Old = FItems; // Odlozim aktualny zoznam
            int R = -9999;

            //if (!pCanReadFromCache) IApp.GlobalData.SavePassword(L.PasswordCacheID, null); // Zrusim heslo z cache pri zakaze cache

            L.AskForCredentialsEnabled = true; // Povolim ziadost o meno a heslo
            if (L.NeedPasswordForExpand)
            {
                string P = "";
                if (!IApp.ShowEditor_String(IApp.App.AppTitle, lang.FILE_EXPLORER_TEXT_30, ref P, -1, true, null, null, true))
                {
                    if (!pUseDefaultIfFail) // Nepouzit default?
                    {
                        if (!pSilentMode) // Zobrazit chybu?
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_3);
                        }
                        CancelLoadContent(); // Zrusenie load
                        return false;
                    }
                    L = INodeList.CreateNodeList(""); // Vytvorim default
                }
                else L.SetPassword(P);
            }

            if (FIconExtractor != null) FIconExtractor.Stop();

            using (INodeFilters F = new INodeFilters())
            {
                int FIdx = FParams.GetParam("CFM", INodeFilters.PREDDEFINED_ID_ALL);
                if (FIdx == -1) F.Deserialize(FParams.GetParam("CF", "")); // Custom filter?
                else F.LoadPreddefined(FParams.GetParam("CFM", INodeFilters.PREDDEFINED_ID_ALL)); // Preddefinovany

                if (L.ThreadExpandAvailable) // Threadove riesenie
                {
                    string Err = "";
                    L.ProgressMessage = new IThrSafeVariable(); // Chcem popis progresu

                    System.Threading.Thread Thr = new System.Threading.Thread(delegate()
                        {
                            int R1 = L.FullExpand(F, pCanReadFromCache); // Expandujem
                            if (R1 != 0) // Chyba?
                            {
                                if (!pUseDefaultIfFail) // Nepouzit default?
                                {
                                    Err = L.LastError;
                                    L.Dispose();
                                    R1 = -1;
                                }
                                else
                                {
                                    L.Dispose(); L = INodeList.CreateNodeList(""); L.FullExpand(F); // Nacitam default
                                    R1 = 0;
                                }
                            }
                            if (R1 == 0)
                            {
                                FItems = L; // Nastavim novy
                                LoadNodeListParams(); // Nacitam parametre
                                FItems = Old;
                                L.Sort(); // Volam triedenie
                            }
                            R = R1;
                        }
                        );

                    IApp.App.StartMonitorEscape();

                    IApp.App.WaitCursor = true;
                    Thr.Start();
                    
                    System.Diagnostics.Stopwatch W = new System.Diagnostics.Stopwatch();
                    W.Start();

                    while (true)
                    {
                        System.Threading.Thread.Sleep(1);
                        if (R != -9999) break;
                        if (IApp.App.IsEscPressed) // Stlacene ESC?
                        {
                            L.WantExpandBreak.BoolValue = true; // Nastavim priznak prerusenia
                            R = -100;
                            break;
                        }
                        if (W.ElapsedMilliseconds > 250)
                        {
                            if (L.ProgressMessage != null) ParentPanel.UpdateMainStatus(L.ProgressMessage.StringValue, true);
                            W.Reset(); W.Start();
                        }
                    }
                    Thr = null;
                    IApp.App.StopMonitorEscape();
                    IApp.App.WaitCursor = false;
                    ParentPanel.UpdateMainStatus("", true);

                    if (R == -100)
                    {
                        FIconExtractor.Resume();
                        CancelLoadContent(); // Zrusenie load
                        return false;
                    }
                    if (R != 0)
                    {
                        if (!pSilentMode) IApp.ShowError(Err == "" ? lang.FILE_EXPLORER_TEXT_3 : Err); // Zobrazim chybu
                        FIconExtractor.Resume();
                        CancelLoadContent(); // Zrusenie load
                        return false;
                    }
                }
                else // Nethreadove riesenie
                {
                    R = L.FullExpand(F, pCanReadFromCache); // Expandujem
                    if (R != 0) // Chyba?
                    {
                        if (!pUseDefaultIfFail) // Nepouzit default?
                        {
                            if (!pSilentMode) IApp.ShowError(L.LastError == "" ? lang.FILE_EXPLORER_TEXT_3 : L.LastError); // Zobrazim chybu
                            L.Dispose();
                            FIconExtractor.Resume();
                            CancelLoadContent(); // Zrusenie load
                            return false;
                        }
                        L.Dispose(); L = INodeList.CreateNodeList(""); L.FullExpand(F); // Nacitam default
                    }
                }
            }

            FItems = L; // Nastavim novy
            LoadNodeListParams(); // Nacitam parametre

            FList.BeginCreate();
            FillList((Old == null) || (Old.ID != FItems.ID)); // Vyplnim zoznam
            FList.EndCreate(FItems.FindByKeyValue(pInitKeyValue));

            if (Old != null) Old.Dispose(); // Zrusim povodny zaznam
            FLastListUpdated = DateTime.Now.Ticks;
            UpdateStatuses(); // Aktualizujem statusy
            
            FList.SetSortIcon(!FItems.CanSort ? -1 : FItems.SortColumn, FItems.SortAsc); // Nastavim ikonu triedenia
            FIconExtractor.Reset(IApp.Settings.FileExplorer_DisplayIconMode, FItems); FIconExtractor.Enabled = pUpdateIcons;
            
            FItems.StartChangedWatch(); // Spustim dohlad nad zmenami
            FTimer.Start(); // Spustim casovac
            
            IApp.GlobalData.FileExplorer_ExpandHistory.Add(FItems.CurrentPath); // Zaradim cestu do historie

            return true;
        }
        /// <summary>Aktualizacia objektu po zmene nastavenia</summary>
        public void UpdateAfterChangeSettings()
        {
            switch (FItems.ID)
            {
                case INodeList.NODE_LIST_ID_SMB_SHARES:
                    {
                        Reload();
                    } break;
                default:
                    {
                        FList.BeginUpdate();
                        FItems.DiscardDisplayData(-1); // Zrusim data
                        FList.EndUpdate(); FList.Refresh(); FList.Invalidate(true);
                    } break;
            }
        }
        /// <summary>Vykonanie prikazu</summary>
        /// <param name="pCMD_ID">ID prikazu</param>
        /// <param name="pAPP_TARGET">aplikacia</param>
        /// <param name="pPANEL_TARGET">panel</param>
        /// <returns>true / false</returns>
        public bool ExecCMD(int pCMD_ID, int pAPP_TARGET, int pPANEL_TARGET)
        {
            if (!CanExecCMD(pCMD_ID)) return false; // Spustim test moznosti spustenia

            int I = ActiveItemIndex;
            if (FListToolTip != null) FListToolTip.Active = false; // Skryjem tooltip

            switch (pCMD_ID)
            {
                #region ICmd.CMD_ID_FILE_EXPLORER_MULTI_RENAME_TOOL
                case ICmd.CMD_ID_FILE_EXPLORER_MULTI_RENAME_TOOL:
                    {
                        IMultiRenameData_Str Data = new IMultiRenameData_Str();
                        
                        int C = FItems.ItemsCount; // Pocet nodov
                        for (int i = 0; i <= C; i++) // Prechadzam...
                        {
                            if (!FItems.GetNodeSelection(i)) continue; // Nie je oznaceny?
                            string FN = FItems.GetNodeExpandPath(i); // Ziskam nazov
                            Data.SourceFileNames.Add(FN); // Zaradim
                            Data.DestinationFileNames.Add(IFileSystem.ExtractName(FN));
                        }

                        if (!Data.EditWithForm()) return true; // Editujem nazvy

                        BeginLoadContent(); 
                        IFileExplorer_ProgressForm_MultiRename F = new IFileExplorer_ProgressForm_MultiRename(500, 96, false, Data.SourceFileNames.Count);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_MultiRenameItems(Data, F);
                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });

                        return true; // Prikaz vykonany
                    } 
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_FULL_LIST
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FULL_LIST:
                    {
                        INodeList L = INodeList.CreateNodeList(FItems.CurrentPath);
                        if (L == null) return true; // Nepodarilo sa vytvorit zoznam?

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_46_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList_VirtualItems VirtualList = new INodeList_VirtualItems(FItems.CurrentPath, true);
                            if (!L.Run_CreateVirtualList(VirtualList, F.WaitForTerminate))
                            {
                                L.Dispose();
                                VirtualList.Dispose();
                                ParentPanel.FinishWorkMode(delegate()
                                {
                                });
                            }
                            else
                            {
                                L.Dispose(); L = null;
                                VirtualList.CompleteList(); // Spojim priecinky so subormi
                                VirtualList.ListDescription = lang.FILE_EXPLORER_TEXT_46;

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    CreateContentFromList(VirtualList, "", true);
                                });
                            }
                        });


                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EJECT_CD_DEVICE
                case ICmd.CMD_ID_FILE_EXPLORER_EJECT_CD_DEVICE:
                    {
                        if (FItems.IsCDDevice)
                        {
                            if (IFileSystem.EjectInsertCD(FItems.DeviceRootPath) == 0) Go("", true, true, FItems.DeviceRootPath.ToLower());
                            return true; // Prikaz vykonany
                        }

                        if (IFileSystem.EjectInsertCD(FItems.GetNodeExpandPath(I)) == 0) Reload();
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_NEW_FILE_FROM_CLIPBOARD
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_NEW_FILE_FROM_CLIPBOARD:
                    {
                        string FN = "";
                        int FileType = 0;
                        string Ext = "";
                        int R;

                        switch (ICore.GetClipboardDataType())
                        {
                            case ICore.CLIPBOARD_TYPE_TEXT:
                                {
                                    R = 0;
                                    if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_45, lang.FILE_EXPLORER_TEXT_45_1, lang.FILE_EXPLORER_TEXT_45_2, lang.FILE_EXPLORER_TEXT_45_3, ref R)) return true; // Ziskam typ vystupu
                                    switch (R)
                                    {
                                        case 1: { FileType = ICore.FILE_TYPE_UNICODE_TXT; Ext = "txt"; } break;
                                        default: { FileType = ICore.FILE_TYPE_TXT; Ext = "txt"; } break;
                                    }
                                } break;
                            case ICore.CLIPBOARD_TYPE_BITMAP:
                                {
                                    R = 0;
                                    if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_45, lang.FILE_EXPLORER_TEXT_45_4, lang.FILE_EXPLORER_TEXT_45_5, lang.FILE_EXPLORER_TEXT_45_6, ref R)) return true; // Ziskam typ vystupu
                                    switch (R)
                                    {
                                        case 1: { FileType = ICore.FILE_TYPE_PNG; Ext = "png"; } break;
                                        case 2: { FileType = ICore.FILE_TYPE_JPG; Ext = "jpg"; } break;
                                        default: { FileType = ICore.FILE_TYPE_BMP; Ext = "bmp"; } break;
                                    }
                                } break;
                            default: return true; // Ziaden podporovany typ
                        }

                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_45, lang.FILE_EXPLORER_TEXT_45_7, ref FN, -1, false, "NEW_FILE_CLIPBOARD")) return true; // Ziskam nazov suboru
                        if (string.Compare(IFileSystem.ExtractExtension(FN), Ext, true) != 0) FN += "." + Ext; // Doplnim priponu
                        FN = IFileSystem.AppendToPath(FItems.CurrentPath, FN);

                        IFileExplorer_ProgressForm_CreateFileFromClipboard F = new IFileExplorer_ProgressForm_CreateFileFromClipboard(600, 96, 1);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_CreateFileFromClipboard(FileType, FN, F, FItems.ConnectionProvider); // Spustim vytvaranie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(IFileSystem.ExtractName(FN).ToLower()); // Znovu nacitam obsah panela
                            });
                        });

                        return true; // Vsetko OK
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_EMPTY_FILE
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_EMPTY_FILE:
                    {
                        string FN = "";
                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_43, lang.FILE_EXPLORER_TEXT_43_1, ref FN, -1, false)) return true; // Ziskam nazov suboru

                        if (FItems.CreateEmptyFile(FN) != 0)
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_43_2);
                            return true; // Vytvorim subor
                        }
                        IApp.RunExternalEditor(IFileSystem.AppendToPath(FItems.CurrentPath, FN)); // Otvorim ho v editore

                        return true; // Vsetko OK
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_SELECTED:
                    {
                        int DestConnProvider; string OutputPath;
                        IDecryptionSettingsStr Data = new IDecryptionSettingsStr(); Data.Deserialize(IApp.GlobalData.FileExplorer_DecryptSettings);
                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (OppositePanel.FItems.IsEncryptionDestination)
                            {
                                DestConnProvider = OppositePanel.FItems.ConnectionProvider;
                                OutputPath = OppositePanel.FItems.CurrentPath;
                            }
                            else
                            {
                                if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                                DestConnProvider = FItems.ConnectionProvider;
                                OutputPath = FItems.CurrentPath;
                            }
                        }
                        else
                        {
                            if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                            DestConnProvider = FItems.ConnectionProvider;
                            OutputPath = FItems.CurrentPath;
                        }

                        string FN = FItems.GetNodeExpandPath(I);
                        if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_42_2, FN))) return true; // Potvrdim sifrovanie

                        if (!Data.EditWithForm(true)) return true; // Editujem nastavenie

                        System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames_Files();
                        long TotalSize = FItems.GetTotalSizeOfSelectedFullNames_Files();

                        BeginLoadContent();
                        if (ParentPanel.IsDualPanelMode) OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_DecryptFiles F = new IFileExplorer_ProgressForm_DecryptFiles(600, 96, false, 1, (ulong)TotalSize);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_DecryptFiles(Data, OutputPath, L, F, FItems.ConnectionProvider, DestConnProvider); // Spustim sifrovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                if (ParentPanel.IsDualPanelMode) OppositePanel.Reload();
                            });
                        });

                        IApp.GlobalData.FileExplorer_DecryptSettings = Data.Serialize();
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_ACTIVE:
                    {
                        int DestConnProvider; string OutputPath;
                        IDecryptionSettingsStr Data = new IDecryptionSettingsStr(); Data.Deserialize(IApp.GlobalData.FileExplorer_DecryptSettings);
                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (OppositePanel.FItems.IsEncryptionDestination)
                            {
                                DestConnProvider = OppositePanel.FItems.ConnectionProvider;
                                OutputPath = OppositePanel.FItems.CurrentPath;
                            }
                            else
                            {
                                if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                                DestConnProvider = FItems.ConnectionProvider;
                                OutputPath = FItems.CurrentPath;
                            }
                        }
                        else
                        {
                            if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                            DestConnProvider = FItems.ConnectionProvider;
                            OutputPath = FItems.CurrentPath;
                        }

                        string FN = FItems.GetNodeExpandPath(I);
                        if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_42_1, FN))) return true; // Potvrdim sifrovanie

                        if (!Data.EditWithForm()) return true; // Editujem nastavenie

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        L.Add(FN); // Vytvorim zoznam s jednym suborom

                        BeginLoadContent();
                        if (ParentPanel.IsDualPanelMode) OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_DecryptFiles F = new IFileExplorer_ProgressForm_DecryptFiles(600, 96, false, 1, (ulong)FItems[I].Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_DecryptFiles(Data, OutputPath, L, F, FItems.ConnectionProvider, DestConnProvider); // Spustim sifrovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                if (ParentPanel.IsDualPanelMode) OppositePanel.Reload();
                            });
                        });

                        IApp.GlobalData.FileExplorer_DecryptSettings = Data.Serialize();
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES:
                    {
                        if (FItems.SelectedFilesCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DECRYPT_FILES_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_SELECTED:
                    {

                        IEncryptionSettingsStr Data = new IEncryptionSettingsStr(); Data.Deserialize(IApp.GlobalData.FileExplorer_EncryptSettings);
                        int DestConnProvider;

                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (OppositePanel.FItems.IsEncryptionDestination)
                            {
                                DestConnProvider = OppositePanel.FItems.ConnectionProvider;
                                Data.OutputPath = OppositePanel.FItems.CurrentPath;
                            }
                            else
                            {
                                if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                                DestConnProvider = FItems.ConnectionProvider;
                                Data.OutputPath = FItems.CurrentPath;
                            }
                        }
                        else
                        {
                            if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                            DestConnProvider = FItems.ConnectionProvider;
                            Data.OutputPath = FItems.CurrentPath;
                        }
                        
                        if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_41_2)) return true; // Potvrdim sifrovanie

                        if (!Data.EditWithForm()) return true; // Nastavim sifrovanie

                        System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames_Files(); // Ziskam zoznam suborov
                        long TotalSize = FItems.GetTotalSizeOfSelectedFullNames_Files();

                        BeginLoadContent();
                        if (ParentPanel.IsDualPanelMode) OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_EncryptFiles F = new IFileExplorer_ProgressForm_EncryptFiles(600, 96, true, L.Count, (ulong)TotalSize);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_EncryptFiles(Data, L, F, FItems.ConnectionProvider, DestConnProvider); // Spustim sifrovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                if (ParentPanel.IsDualPanelMode) OppositePanel.Reload();
                            });
                        });

                        IApp.GlobalData.FileExplorer_EncryptSettings = Data.Serialize();
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_ACTIVE:
                    {
                        IEncryptionSettingsStr Data = new IEncryptionSettingsStr(); Data.Deserialize(IApp.GlobalData.FileExplorer_EncryptSettings);
                        int DestConnProvider;

                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (OppositePanel.FItems.IsEncryptionDestination)
                            {
                                DestConnProvider = OppositePanel.FItems.ConnectionProvider;
                                Data.OutputPath = OppositePanel.FItems.CurrentPath;
                            }
                            else
                            {
                                if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                                DestConnProvider = FItems.ConnectionProvider;
                                Data.OutputPath = FItems.CurrentPath;
                            }
                        }
                        else
                        {
                            if (!FItems.IsEncryptionDestination) return true; // Nie je mozne prijat zasifrovany subor?
                            DestConnProvider = FItems.ConnectionProvider;
                            Data.OutputPath = FItems.CurrentPath;
                        }

                        string FN = FItems.GetNodeExpandPath(I);
                        if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_41_1, FN))) return true; // Potvrdim sifrovanie

                        if (!Data.EditWithForm()) return true; // Nastavim sifrovanie

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        L.Add(FN); // Vytvorim zoznam s jednym suborom

                        BeginLoadContent();
                        if (ParentPanel.IsDualPanelMode) OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_EncryptFiles F = new IFileExplorer_ProgressForm_EncryptFiles(600, 96, true, 1, (ulong)FItems[I].Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_EncryptFiles(Data, L, F, FItems.ConnectionProvider, DestConnProvider); // Spustim sifrovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                if (ParentPanel.IsDualPanelMode) OppositePanel.Reload();
                            });
                        });

                        IApp.GlobalData.FileExplorer_EncryptSettings = Data.Serialize(); // Ulozim obsah
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES:
                    {
                        if (FItems.SelectedFilesCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_ENCRYPT_FILES_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXPORT_LIST_TO_FILE
                case ICmd.CMD_ID_FILE_EXPLORER_EXPORT_LIST_TO_FILE:
                    {
                        IFileExplorerForm_ExportListToFile.IExportListToFileStr Data = new IFileExplorerForm_ExportListToFile.IExportListToFileStr();
                        Data.Deserialize(IApp.GlobalData.FileExplorer_ExportListSettings);
                        if (!Data.EditWithForm()) return true; // Ziskam nastavenie od uzivatela

                        string OutputFile = IApp.ShowEditor_ChooseFileSave(lang.FORM_EXPORT_ITEMS_TO_LIST_TEXT_5, Data.FilterString);
                        if (string.IsNullOrEmpty(OutputFile)) return true; // Poziadam o nazov suboru

                        INodeList.IComputeOccupiedSpaceData StatData = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        StatData.SourceClusterSize = -1; StatData.DestClusterSize = -1;

                        System.Collections.Generic.List<string> Items = new System.Collections.Generic.List<string>(); // Vsetky zaznamy
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Priecinky

                        if (FItems.SelectedCount > 0)
                        {
                            int C = FItems.NodesCount;
                            for (int i = 0; i < C; i++) // Vyplnim zoznamy pre spracovanie
                            {
                                if (!FItems[i].Selected) continue;
                                Items.Add(FItems.GetNodeExpandPath(i));
                                if (FItems[i].IsDirectory) Dirs.Add(FItems.GetNodeExpandPath(i));
                                else StatData.AddFile(FItems[i].Size);
                            }
                        }
                        else
                        {
                            Items.Add(FItems.GetNodeExpandPath(I));
                            if (FItems[I].IsDirectory) Dirs.Add(FItems.GetNodeExpandPath(I));
                        }

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_40_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (Dirs.Count > 0)
                            {
                                foreach (string FN in Dirs)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, StatData, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_ExportListOfItems F1 = new IFileExplorer_ProgressForm_ExportListOfItems(600, 96, !Skip, StatData.FilesCount + StatData.DirsCount);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.RunExportListToFile(Data, Items, OutputFile, F1);

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });

                        IApp.GlobalData.FileExplorer_ExportListSettings = Data.Serialize(); // Ulozim nastavenie
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_SELECTED:
                    {
                        int ChoosedCompressionType = 0; // Vybrana kompresia
                        string FullFN = FItems.GetNodeExpandPath(I);
                        string ArchiveName;

                        bool CalculateInfo;
                        INodeList.IComputeOccupiedSpaceData StatData = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        StatData.SourceClusterSize = -1; StatData.DestClusterSize = -1;

                        System.Collections.Generic.List<string> List = new System.Collections.Generic.List<string>();
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>();

                        int C = FItems.NodesCount;
                        for (int i = 0; i < C; i++) // Vyplnim zoznamy pre spracovanie
                        {
                            if (!FItems[i].Selected) continue;
                            if (!FItems.IsSourceForArchiveItem(i)) continue;
                            List.Add(FItems.GetNodeExpandPath(i));
                            if (FItems[i].IsDirectory) Dirs.Add(FItems.GetNodeExpandPath(i));
                            else StatData.AddFile(FItems[i].Size);
                        }

                        if (List.Count == 0) return true; // Ziadne polozky na spracovanie?

                        ICompressionDataStr Data = new ICompressionDataStr(); // Vytvorim datovu strukturu
                        Data.Deserialize(IApp.GlobalData.FileExplorer_CompressionSettings);

                        int R;

                        switch (Data.CompressionType)
                        {
                            case ICompressionDataStr.COMPRESSION_TYPE_TAR: R = 0; break;
                            case ICompressionDataStr.COMPRESSION_TYPE_TGZ: R = 1; break;
                            default: R = 2; break;
                        }

                        if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_39_1, string.Format(lang.FILE_EXPLORER_TEXT_39_14_1, FullFN), lang.FILE_EXPLORER_TEXT_39_2_2, lang.FILE_EXPLORER_TEXT_39_2_3, ref R)) return true; // Ziskam typ archivu
                        switch (R)
                        {
                            case 2: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_ZIP; break;
                            case 1: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TGZ; break;
                            default: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TAR; break;
                        }
                        CalculateInfo = true;

                        ArchiveName = IFileSystem.ExtractNameOnly(IFileSystem.ExtractName(FullFN)) + "." + ICompressionDataStr.GetDefaultExtension(ChoosedCompressionType); // Vytvorim prednastaveny nazov archivu
                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_39_1, lang.FILE_EXPLORER_TEXT_39_3, ref ArchiveName, -1, false, "CREATE_ARCHIVE", null, false)) return true; // Ziskam nazov archivu

                        Data.CompressionType = ChoosedCompressionType;

                        if (!Data.EditWithForm()) return true; // Nastavim parametre
                        IApp.GlobalData.FileExplorer_CompressionSettings = Data.Serialize();

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        Data.DestinationArchiveName = IFileSystem.AppendToPath(OppositePanel.FItems.CurrentPath, ArchiveName);

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_39_4);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo)
                            {
                                foreach (string FN in Dirs)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, StatData, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_CompressItems F1 = new IFileExplorer_ProgressForm_CompressItems(600, 96, !Skip, StatData.FilesCount + StatData.DirsCount, (ulong)StatData.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_CreateArchive(Data, List, F1);

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_ACTIVE:
                    {
                        int ChoosedCompressionType = 0; // Vybrana kompresia
                        string FullFN = FItems.GetNodeExpandPath(I);
                        string ArchiveName;

                        bool CalculateInfo;
                        INodeList.IComputeOccupiedSpaceData StatData = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        StatData.SourceClusterSize = -1; StatData.DestClusterSize = -1;

                        ICompressionDataStr Data = new ICompressionDataStr(); // Vytvorim datovu strukturu
                        Data.Deserialize(IApp.GlobalData.FileExplorer_CompressionSettings);

                        if (FItems[I].IsFile) // Subor?
                        {
                            int R;
                            switch (Data.CompressionType)
                            {
                                case ICompressionDataStr.COMPRESSION_TYPE_GZIP: R = 0; break;
                                case ICompressionDataStr.COMPRESSION_TYPE_TAR: R = 1; break;
                                case ICompressionDataStr.COMPRESSION_TYPE_TGZ: R = 2; break;
                                default: R = 3; break;
                            }
                            if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_39_1, string.Format(lang.FILE_EXPLORER_TEXT_39_1_1, FullFN), lang.FILE_EXPLORER_TEXT_39_1_2, lang.FILE_EXPLORER_TEXT_39_1_3, ref R)) return true; // Ziskam typ archivu
                            switch (R)
                            {
                                case 3: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_ZIP; break;
                                case 2: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TGZ; break;
                                case 1: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TAR; break;
                                default: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_GZIP; break;
                            }
                            CalculateInfo = false; StatData.AddFile(FItems[I].Size);
                        }
                        else // Priecinok?
                        {
                            int R;

                            switch (Data.CompressionType)
                            {
                                case ICompressionDataStr.COMPRESSION_TYPE_TAR: R = 0; break;
                                case ICompressionDataStr.COMPRESSION_TYPE_TGZ: R = 1; break;
                                default: R = 2; break;
                            }

                            if (!IApp.ShowEditor_ChooseFromList(lang.FILE_EXPLORER_TEXT_39_1, string.Format(lang.FILE_EXPLORER_TEXT_39_2_1, FullFN), lang.FILE_EXPLORER_TEXT_39_2_2, lang.FILE_EXPLORER_TEXT_39_2_3, ref R)) return true; // Ziskam typ archivu
                            switch (R)
                            {
                                case 2: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_ZIP; break;
                                case 1: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TGZ; break;
                                default: ChoosedCompressionType = ICompressionDataStr.COMPRESSION_TYPE_TAR; break;
                            }
                            CalculateInfo = true;
                        }

                        ArchiveName = IFileSystem.ExtractNameOnly(IFileSystem.ExtractName(FullFN)) + "." + ICompressionDataStr.GetDefaultExtension(ChoosedCompressionType); // Vytvorim prednastaveny nazov archivu
                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_39_1, lang.FILE_EXPLORER_TEXT_39_3, ref ArchiveName, -1, false, "CREATE_ARCHIVE", null, false)) return true; // Ziskam nazov archivu

                        Data.CompressionType = ChoosedCompressionType;

                        if (!Data.EditWithForm()) return true; // Nastavim parametre
                        IApp.GlobalData.FileExplorer_CompressionSettings = Data.Serialize();

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        System.Collections.Generic.List<string> List = new System.Collections.Generic.List<string>(); List.Add(FullFN);
                        Data.DestinationArchiveName = IFileSystem.AppendToPath(OppositePanel.FItems.CurrentPath, ArchiveName);

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_39_4);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo)
                            {
                                if (!CalculateFolderSpaceOccupied(FullFN, StatData, F.WaitForTerminate))
                                {
                                    Skip = true;
                                }
                            }

                            IFileExplorer_ProgressForm_CompressItems F1 = new IFileExplorer_ProgressForm_CompressItems(600, 96, !Skip, StatData.FilesCount + StatData.DirsCount, (ulong)StatData.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_CreateArchive(Data, List, F1);

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COMPRESS
                case ICmd.CMD_ID_FILE_EXPLORER_COMPRESS:
                    {
                        if (FItems.SelectedCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COMPRESS_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_FILE_CLONE
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FILE_CLONE:
                    {
                        string FN1 = IFileSystem.ExtractName(FItems.GetNodeExpandPath(I));
                        string FN = IFileSystem.ExtractNameOnly(FN1) + " - Copy." + IFileSystem.ExtractExtension(FN1); // Nove meno suboru

                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_38_1, lang.FILE_EXPLORER_TEXT_38_2, ref FN, -1, false)) return true; // Ziskam nove meno

                        FN = IFileSystem.AppendToPath(FItems.CurrentPath, FN);
                        if (string.Compare(FN, FItems.GetNodeExpandPath(I), true) == 0) return true; // Su nazvy rovnake?

                        if (IFileSystem.GetObjectType(FN) == IFileSystem.OBJECT_TYPE_FILE)
                        {
                            if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_38_3)) return true; // Potvrdim prepisanie
                        }

                        BeginLoadContent();
                        IFileExplorer_ProgressForm_CloneFile F = new IFileExplorer_ProgressForm_CloneFile(500, 96, FItems[I].Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            FItems.Run_CloneFile(FItems.GetNodeExpandPath(I), FN, F); // Spustenie klonovania
                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });

                        return true; // Vsetko OK
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_SELECTED:
                    {
                        if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_36_3)) return true; // Potvrdim 

                        string DestPath; // Vytvorim vysledny nazov
                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (FItems.CanServerPath(OppositePanel.FItems.CurrentPath)) DestPath = OppositePanel.FItems.CurrentPath;
                            else DestPath = FItems.CurrentPath;
                        }
                        else DestPath = FItems.CurrentPath;

                        BeginLoadContent();
                        if (ParentPanel.IsDualPanelMode) OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_CreateLinks F = new IFileExplorer_ProgressForm_CreateLinks(500, 96, true, FItems.SelectedCount);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            int C = FItems.NodesCount;
                            for (int i = 0; i < C; i++)
                            {
                                if (!FItems[i].Selected) continue;
                                string FN = IFileSystem.AppendToPath(DestPath, FItems[i].Name) + ".lnk";
                                FItems.CreateShortcut(FN, FItems.GetNodeExpandPath(i)); // Vytvorim link

                                if (FItems[i].IsDirectory) F.AddDir(); else F.AddFile();
                                if (F.WaitForTerminate.BoolValue) break;
                            }

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                if (ParentPanel.IsDualPanelMode) OppositePanel.Reload();
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_ACTIVE:
                    {
                        string FN = FItems.GetNodeExpandPath(I); // Ziskam nazov
                        if (FItems[I].IsFile)
                        {
                            if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_36_1, FN))) return true; // Potvrdim 
                        }
                        else
                        {
                            if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_36_2, FN))) return true; // Potvrdim 
                        }

                        string DestPath; // Vytvorim vysledny nazov
                        if (ParentPanel.IsDualPanelMode)
                        {
                            if (FItems.CanServerPath(OppositePanel.FItems.CurrentPath)) DestPath = OppositePanel.FItems.CurrentPath;
                            else DestPath = FItems.CurrentPath;
                        }
                        else DestPath = FItems.CurrentPath;
                        DestPath = IFileSystem.AppendToPath(DestPath, FItems[I].Name); DestPath += ".lnk";

                        FItems.CreateShortcut(DestPath, FN); // Vytvorim link

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK:
                    {
                        if (FItems.SelectedFilesCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_CREATE_LINK_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RUN_VIEWER
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_VIEWER:
                    {
                        IApp.RunExternalEditor(FItems.GetNodeExpandPath(I), FItems.CurrentPath); // Spustim
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RUN_INTERNAL_VIEWER
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_INTERNAL_VIEWER:
                    {
                        if (FItems.SelectedFilesCount == 0)
                        {
                            if (!FItems.NeedNodeToBeCopiedForView(I))
                            {
                                IApp.ShowInternalViewer(FItems.GetNodeExpandPath(I));
                            }
                            else
                            {
                                // Vytvorim nazov v temp priecinku
                                string FN = IFileSystem.AppendToPath(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_TEMP), FItems[I].Name);

                                IFileExplorer_ProgressForm_CopyFileForView F = new IFileExplorer_ProgressForm_CopyFileForView(500, 96, FItems[I].Size);
                                ParentPanel.StartWorkMode(F, delegate()
                                {
                                    if (!FItems.Run_CloneFile(FItems.GetNodeExpandPath(I), FN, F)) // Spustenie klonovania
                                    {
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                        });
                                    }
                                    else
                                    {
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                            IApp.ShowInternalViewer(FN);
                                        });
                                    }
                                });
                            }
                        }
                        else
                        {
                            System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames_Files();
                            IApp.ShowInternalViewer(L);
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_NEW_FTP
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_NEW_FTP:
                    {
                        IFTPStorageDef StorageDef = new IFTPStorageDef();
                        if (!StorageDef.EditWithForm()) return true; // Spustim editaciu

                        IApp.GlobalData.AddStorageDef(StorageDef); // Zaradim
                        Reload(); // Znovu nacitam

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_DELETE_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_DELETE_ACTIVE:
                    {
                        int ConnProvider = FItems[I].ConnectionProvider;
                        ICloudStorageDef StorageDef = IApp.GlobalData.GetStorageDef(ConnProvider); // Ziskam objekt s definiciou
                        if (StorageDef == null) return true; // Chyba?

                        if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_34, StorageDef.Name))) return true; // Potvrdim mazanie
                        
                        IApp.GlobalData.DeleteStorageDef(StorageDef.ID); // Volam vymazanie

                        Reload(); // Znovu nacitam

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_EDIT
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_EDIT:
                    {
                        int ConnProvider = FItems[I].ConnectionProvider;
                        ICloudStorageDef StorageDef = IApp.GlobalData.GetStorageDef(ConnProvider); // Ziskam objekt s definiciou
                        if (StorageDef == null) return true; // Chyba?

                        if (!StorageDef.EditWithForm()) return true; // Spustim editaciu
                        IApp.GlobalData.UpdateStorageDef(StorageDef);
                        Reload(); // Znovu nacitam

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR_FTP
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR_FTP:
                    {
                        if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_33)) return true; // Potvrdim vymazanie
                        IApp.GlobalData.ClearConnectionProviders(ICloudStorageDef.TYPE_FTP); // Volam vymazanie vsetkych

                        Reload(); // Znovu nacitam

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR
                case ICmd.CMD_ID_FILE_EXPLORER_CLOUD_SERVICES_CLEAR:
                    {
                        if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_32)) return true; // Potvrdim vymazanie
                        IApp.GlobalData.ClearConnectionProviders(); // Volam vymazanie vsetkych

                        Reload(); // Znovu nacitam

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RUN_EDITOR
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_EDITOR:
                    {
                        if (FItems[I].Size > 102 * 1024) // Je subor velky?
                        {
                            if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_31)) return true; // Opytam sa ci pokracovat
                        }
                        if (!FItems.NeedNodeToBeCopiedForView(I)) IApp.RunExternalEditor(FItems.GetNodeExpandPath(I), FItems.CurrentPath); // Spustim
                        else
                        {
                            // Vytvorim nazov v temp priecinku
                            string FN = IFileSystem.AppendToPath(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_TEMP), FItems[I].Name);

                            IFileExplorer_ProgressForm_CopyFileForEdit F = new IFileExplorer_ProgressForm_CopyFileForEdit(500, 96, FItems[I].Size);
                            ParentPanel.StartWorkMode(F, delegate()
                            {
                                if (!FItems.Run_CloneFile(FItems.GetNodeExpandPath(I), FN, F)) // Spustenie klonovania
                                {
                                    ParentPanel.FinishWorkMode(delegate()
                                    {
                                    });
                                }
                                else
                                {
                                    ParentPanel.FinishWorkMode(delegate()
                                    {
                                        IApp.RunExternalEditor(FN, FItems.CurrentPath); // Spustim
                                    });
                                }
                            });
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_SELECTED:
                    {
                        IVerifyChecksumDataStruct Data = new IVerifyChecksumDataStruct();

                        System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames_Files(); // Ziskam zoznam oznacenych suborov
                        foreach (string FN in L)
                        {
                            Data.Add(FN, "MD5", "", "");
                        }

                        if (!Data.EditWithForm()) // Volam zistanie udajov pre kontrolu
                        {
                            Data.Dispose();
                            return true; // Koniec
                        }

                        long Size = 0;
                        foreach (IVerifyChecksumDataStruct.IVerifyChecksumItem Item in Data.Items)
                        {
                            Size += IFileSystem.GetFileSize(Item.SourceFileName);
                        }

                        IFileExplorer_ProgressForm_VerifyChecksum F = new IFileExplorer_ProgressForm_VerifyChecksum(500, 96, Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {

                            string ResultMsg = null;
                            if (INodeList.Run_VerifyChecksum(Data, F))
                            {
                                System.Text.StringBuilder B = new System.Text.StringBuilder();
                                foreach (IVerifyChecksumDataStruct.IVerifyChecksumItem Item in Data.Items)
                                {
                                    B.AppendLine(string.Format(Item.ResultChecksum == Item.ExpectedChecksum ? lang.FILE_EXPLORER_TEXT_29_4_2 : lang.FILE_EXPLORER_TEXT_29_4_1, Item.SourceFileName));
                                }
                                ResultMsg = B.ToString().Trim();
                            }

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Data.Dispose();
                            }, ResultMsg);
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_ACTIVE:
                    {
                        IVerifyChecksumDataStruct Data = new IVerifyChecksumDataStruct();

                        Data.Add(FItems.GetNodeExpandPath(I), "MD5", "", "");

                        if (!Data.EditWithForm()) // Volam zistanie udajov pre kontrolu
                        {
                            Data.Dispose();
                            return true; // Koniec
                        }

                        long Size = IFileSystem.GetFileSize(Data.Items[0].SourceFileName);

                        IFileExplorer_ProgressForm_VerifyChecksum F = new IFileExplorer_ProgressForm_VerifyChecksum(500, 96, Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {

                            string ResultMsg = null;
                            if (INodeList.Run_VerifyChecksum(Data, F))
                            {
                                ResultMsg = string.Format(Data.Items[0].ResultChecksum == Data.Items[0].ExpectedChecksum ? lang.FILE_EXPLORER_TEXT_29_4_2 : lang.FILE_EXPLORER_TEXT_29_4_1, Data.Items[0].SourceFileName);
                            }

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Data.Dispose();
                            }, ResultMsg);
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM
                case ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM:
                    {
                        if (FItems.SelectedFilesCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_VERIFY_CHECKSUM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_SELECTED:
                    {
                        IGenerateChecksumDataStruct Data = new IGenerateChecksumDataStruct();
                        Data.DestinationPath = ParentPanel.IsDualPanelMode ? OppositePanel.FItems.CurrentPath : FItems.CurrentPath; // Nastavim cielovu cestu
                        if (Data.DestinationPath == "") Data.DestinationPath = FItems.CurrentPath;
                        
                        Data.SourceFiles.AddRange(FItems.GetListOfSelectedFullNames_Files()); // Zaradim aktualny subor

                        if (!Data.EditWithForm()) // Volam konfiguraciu
                        {
                            Data.Dispose();
                            return true;
                        }

                        Data.CreateGenerators(); // Inicializacia generatorov

                        BeginLoadContent();
                        IFileExplorer_ProgressForm_GenerateChecksum F = new IFileExplorer_ProgressForm_GenerateChecksum(500, 96, FItems.GetTotalSizeOfSelectedFullNames_Files());
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_GenerateChecksum(Data, F);
                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload();
                                Data.Dispose();
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_ACTIVE:
                    {
                        IGenerateChecksumDataStruct Data = new IGenerateChecksumDataStruct();
                        Data.DestinationPath = ParentPanel.IsDualPanelMode ? OppositePanel.FItems.CurrentPath : FItems.CurrentPath; // Nastavim cielovu cestu
                        if (Data.DestinationPath == "") Data.DestinationPath = FItems.CurrentPath;
                        Data.SourceFiles.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny subor

                        if (!Data.EditWithForm()) // Volam konfiguraciu
                        {
                            Data.Dispose();
                            return true; 
                        }

                        Data.CreateGenerators(); // Inicializacia generatorov

                        BeginLoadContent();
                        IFileExplorer_ProgressForm_GenerateChecksum F = new IFileExplorer_ProgressForm_GenerateChecksum(500, 96, FItems[I].Size);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_GenerateChecksum(Data, F);
                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload();
                                Data.Dispose();
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM
                case ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM:
                    {
                        if (FItems.SelectedFilesCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_GENERATE_CHECKSUM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_SEARCH
                case ICmd.CMD_ID_FILE_EXPLORER_SEARCH:
                    {
                        string CurrP = FItems.CurrentPath;
                        string CurrP2 = OppositePanel.FItems.CurrentPath;

                        IFileExplorer_ProgressForm_Search F = new IFileExplorer_ProgressForm_Search(600, 600, CurrP, CurrP2);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            while (true) // Hlavna slucka
                            {
                                while (true) // Cakam na zaciatok hladania
                                {
                                    if (F.WaitForTerminate.BoolValue) // Poziadavka na zrusenie?
                                    {
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                        });
                                        return;
                                    }
                                    if (F.RunState.IntValue == 1) break; // Zacat hladanie?
                                    if (F.RunState.IntValue == 3) // Vybrana polozka a prepnutie?
                                    {
                                        string FileName = F.SingleChoosedItem;
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                            Go(IFileSystem.ExtractPath(FileName), false, true, IFileSystem.ExtractName(FileName).ToLower());
                                        });
                                        return;
                                    }
                                    if (F.RunState.IntValue == 4) // Vyrobit zoznam?
                                    {
                                        INodeList_VirtualItems L = F.VirtualList;
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                            CreateContentFromList(L, "", true);
                                        });
                                        return;
                                    }
                                    System.Threading.Thread.Sleep(10);
                                }

                                foreach (string DirName in F.SearchData.SearchPaths)
                                {
                                    if (F.WaitForTerminate.BoolValue) // Poziadavka na zrusenie?
                                    {
                                        ParentPanel.FinishWorkMode(delegate()
                                        {
                                        });
                                        return;
                                    }
                                    INodeList L = INodeList.CreateNodeList(DirName);
                                    if (L == null) continue;

                                    using (L)
                                    {
                                        if (!L.Run_Search(F.SearchData, 0, F)) break;
                                    }
                                }

                                if (F.WaitForTerminate.BoolValue) // Poziadavka na zrusenie?
                                {
                                    ParentPanel.FinishWorkMode(delegate()
                                    {
                                    });
                                    return;
                                }

                                F.StopSearch(); // Zastavim hladanie
                            }
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_LINK
                case ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_LINK:
                    {
                        BeginLoadContent();
                        foreach (string FN in FCurrentDragDropItems)
                        {
                            FItems.CreateShortcut(IFileSystem.AppendToPath(CurrentPath, IFileSystem.ExtractName(FN)) + ".lnk", FN);
                        }
                        Reload();
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_MOVE
                case ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_MOVE:
                    {
                        bool CalculateInfo = false;
                        string DestPath = FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = IFileSystem.ExtractPath(FCurrentDragDropItems[0]); // Ziskam zdrojovu cestu
                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Zoznam priecinkov
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        if (FCurrentDragDropItems.Length == 1)
                        {
                            switch (IFileSystem.GetObjectType(FCurrentDragDropItems[0]))
                            {
                                case IFileSystem.OBJECT_TYPE_FILE:
                                    {
                                        CalculateInfo = false; // Nebude sa pocitat statistika
                                        L.Add(FCurrentDragDropItems[0]); // Zaradim subor
                                        Data.AddFile(IFileSystem.GetFileSize(FCurrentDragDropItems[0]));
                                        Data.FilesCount++;
                                    } break;
                                case IFileSystem.OBJECT_TYPE_DIRECTORY:
                                    {
                                        CalculateInfo = true; // Nebude sa pocitat statistika
                                        L.Add(FCurrentDragDropItems[0]); // Zaradim priecinok
                                        Dirs.Add(FCurrentDragDropItems[0]); // Zaradim priecinok
                                    } break;
                                default: return true; // Neda sa kopirovat
                            }
                        }
                        else
                        {
                            foreach (string FN in FCurrentDragDropItems)
                            {
                                switch (IFileSystem.GetObjectType(FN))
                                {
                                    case IFileSystem.OBJECT_TYPE_FILE:
                                        {
                                            Data.AddFile(IFileSystem.GetFileSize(FN));
                                            Data.FilesCount++;
                                            L.Add(FN);
                                        } break;
                                    case IFileSystem.OBJECT_TYPE_DIRECTORY:
                                        {
                                            CalculateInfo = true; // Nebude sa pocitat statistika
                                            Dirs.Add(FN); // Zaradim priecinok
                                            L.Add(FN);
                                        } break;
                                }
                            }
                        }

                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;

                            INodeList List = INodeList.CreateNodeList(SourcePath);
                            if (List != null)
                            {
                                using (List)
                                {
                                    if (List.SupportFastMoveToPath(DestPath))
                                    {
                                        Skip = true;
                                    }
                                    else
                                    {
                                        if (CalculateInfo)
                                        {
                                            foreach (string FN in Dirs)
                                            {
                                                if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                                {
                                                    Skip = true;
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            else
                            {
                                if (CalculateInfo)
                                {
                                    foreach (string FN in Dirs)
                                    {
                                        if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                        {
                                            Skip = true;
                                            break;
                                        }
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_MoveItems F1 = new IFileExplorer_ProgressForm_MoveItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_MoveItems(SourcePath, DestPath, L, F1, Data, 0, FItems.ConnectionProvider); // Spustim kopirovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_COPY
                case ICmd.CMD_ID_FILE_EXPLORER_DRAG_DROP_COPY:
                    {
                        bool CalculateInfo = false;
                        string DestPath = FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = IFileSystem.ExtractPath(FCurrentDragDropItems[0]); // Ziskam zdrojovu cestu
                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Zoznam priecinkov
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        if (FCurrentDragDropItems.Length == 1)
                        {
                            switch (IFileSystem.GetObjectType(FCurrentDragDropItems[0]))
                            {
                                case IFileSystem.OBJECT_TYPE_FILE: 
                                    {
                                        CalculateInfo = false; // Nebude sa pocitat statistika
                                        L.Add(FCurrentDragDropItems[0]); // Zaradim subor
                                        Data.AddFile(IFileSystem.GetFileSize(FCurrentDragDropItems[0]));
                                        Data.FilesCount++;
                                    } break;
                                case IFileSystem.OBJECT_TYPE_DIRECTORY:
                                    {
                                        CalculateInfo = true; // Nebude sa pocitat statistika
                                        L.Add(FCurrentDragDropItems[0]); // Zaradim priecinok
                                        Dirs.Add(FCurrentDragDropItems[0]); // Zaradim priecinok
                                    } break;
                                default: return true; // Neda sa kopirovat
                            }
                        }
                        else
                        {
                            foreach (string FN in FCurrentDragDropItems)
                            {
                                switch (IFileSystem.GetObjectType(FN))
                                {
                                    case IFileSystem.OBJECT_TYPE_FILE:
                                        {
                                            Data.AddFile(IFileSystem.GetFileSize(FN)); 
                                            Data.FilesCount++;
                                            L.Add(FN);
                                        } break;
                                    case IFileSystem.OBJECT_TYPE_DIRECTORY:
                                        {
                                            CalculateInfo = true; // Nebude sa pocitat statistika
                                            Dirs.Add(FN); // Zaradim priecinok
                                            L.Add(FN);
                                        } break;
                                }
                            }
                        }

                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo)
                            {
                                foreach (string FN in Dirs)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_CopyItems F1 = new IFileExplorer_ProgressForm_CopyItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_CopyItems(SourcePath, DestPath, L, F1, Data, 0, FItems.ConnectionProvider); // Spustim kopirovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SPLIT_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SPLIT_FILES:
                    {
                        ISplitFileDataStruct Data = new ISplitFileDataStruct();
                        Data.FileNameToSplit = FItems.GetNodeExpandPath(I); // Ulozim zdrojovy subor
                        Data.DestinationPath = OppositePanel.FItems.CurrentPath; // Ulozim cielovu cestu
                        Data.SourceSize = FItems[I].Size;

                        if (!Data.EditWithForm()) return true; // Zadam udaje rozdelenia

                        BeginLoadContent();
                        OppositePanel.BeginLoadContent();

                        IFileExplorer_ProgressForm_SplitFile F = new IFileExplorer_ProgressForm_SplitFile(500, 96, Data.SourceSize, Data.SplitSize);
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            INodeList.Run_SplitFile(Data, F); // Spustim proces rozdelovania

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_JOIN_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_JOIN_FILES:
                    {
                        if (FItems.SelectedFilesCount < 2) // Malo oznacenych suborov?
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_26_1);
                            return true;
                        }

                        IJoinFilesDataStruct Data = new IJoinFilesDataStruct();
                        Data.SourceFiles.AddRange(FItems.GetListOfSelectedFullNames_Files());
                        Data.DestinationFolder = OppositePanel.FItems.CurrentPath;
                        Data.DestinationFileName = Data.GetDestinationCandidateFileName();

                        if (!Data.EditWithForm()) return true; // Zobrazim okno pre doplnenie info uzivatelom

                        IFileExplorer_ProgressForm_JoinFiles F = new IFileExplorer_ProgressForm_JoinFiles(500, 96, FItems.GetTotalSizeOfSelectedFullNames_Files());
                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            string ErrMsg;
                            INodeList.Run_JoinFiles(Data, out ErrMsg, F); // Spustim proces spojenia

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            }, string.IsNullOrEmpty(ErrMsg) ? null : ErrMsg);
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_SELECTED:
                    {
                        IAttributeChangeDataObject Data = new IAttributeChangeDataObject();
                        Data.UseUnixAttributes = FItems.HasUnixAttributes; // Nastavim typ atributov

                        if (!Data.EditWithForm()) return true; // Uzivatel zada data
                        if (!Data.AnyChange) return true; // Ziadne zmeny sa vykonavat nemaju?

                        string CurrPath = FItems.CurrentPath;
                        System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_19_4);
                        INodeList.IComputeOccupiedSpaceData Data1 = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data1.SourceClusterSize = -1; Data1.DestClusterSize = -1;

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            foreach (string FN in L)
                            {
                                if (!CalculateFolderSpaceOccupied(FN, Data1, F.WaitForTerminate))
                                {
                                    Skip = true;
                                    break;
                                }
                            }

                            INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                            if (List == null) // Chyba?
                            {
                                ParentPanel.FinishWorkMode(null);
                                return;
                            }

                            IFileExplorer_ProgressForm_ChangeItemsAttributes F1 = new IFileExplorer_ProgressForm_ChangeItemsAttributes(500, 96, !Skip, Data1.FilesCount + Data1.DirsCount);
                            ParentPanel.ReplaceProgressForm(F1);

                            List.Run_ChangeItemsAttributes(Data, L, F1); // Spustim zmenu
                            List.Dispose();

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_ACTIVE:
                    {
                        IAttributeChangeDataObject Data = new IAttributeChangeDataObject();
                        Data.UseUnixAttributes = FItems.HasUnixAttributes; // Nastavim typ atributov
                        Data.UnixAttributes = FItems[I].UnixAttributes;

                        if (!Data.EditWithForm()) return true; // Uzivatel zada data
                        if (!Data.AnyChange) return true; // Ziadne zmeny sa vykonavat nemaju?

                        string CurrPath = FItems.CurrentPath;
                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();

                        bool CalculateInfo = true;
                        if (FItems[I].IsFile) // Je to subor?
                        {
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim subor
                            CalculateInfo &= false; // Nebude sa pocitat statistika
                        }
                        else
                        {
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim priecinok
                            CalculateInfo &= true; // Bude sa ratat statistika
                        }

                        L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam

                        if (CalculateInfo) // Pocitat statistiku?
                        {
                            IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_25_3);
                            INodeList.IComputeOccupiedSpaceData Data1 = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                            Data1.SourceClusterSize = -1; Data1.DestClusterSize = -1;

                            ParentPanel.StartWorkMode(F, delegate()
                            {
                                bool Skip = false;
                                foreach (string FN in L)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data1, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }

                                INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                                if (List == null) // Chyba?
                                {
                                    ParentPanel.FinishWorkMode(null);
                                    return;
                                }

                                IFileExplorer_ProgressForm_ChangeItemsAttributes F1 = new IFileExplorer_ProgressForm_ChangeItemsAttributes(500, 96, !Skip, Data1.FilesCount + Data1.DirsCount);
                                ParentPanel.ReplaceProgressForm(F1);

                                List.Run_ChangeItemsAttributes(Data, L, F1); // Spustim zmenu
                                List.Dispose();

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    Reload(); // Znovu nacitam obsah panela
                                });
                            });
                        }
                        else
                        {
                            IFileExplorer_ProgressForm_ChangeItemsAttributes F = new IFileExplorer_ProgressForm_ChangeItemsAttributes(500, 96, false, 0);
                            ParentPanel.StartWorkMode(F, delegate()
                            {
                                INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                                if (List == null) // Chyba?
                                {
                                    ParentPanel.FinishWorkMode(null);
                                    return;
                                }

                                List.Run_ChangeItemsAttributes(Data, L, F); // Spustim zmenu
                                List.Dispose();

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    Reload(); // Znovu nacitam obsah panela
                                });
                            });
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES
                case ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES:
                    {
                        if (FItems.SelectedCount > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        else return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_CHANGE_ATTRIBUTES_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_SELECTED:
                    {
                        string FN = FItems.ArchiveName;
                        string DestPath = OppositePanel.FItems.CurrentPath;

                        if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_23_12, DestPath)))) return true; // Potvrdim extrahovanie

                        System.Collections.Generic.List<string> Items = FItems.GetListOfSelectedFullNames();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        OppositePanel.BeginLoadContent();

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;

                            INodeList L = INodeList.CreateNodeList(FN); // Vytvorim list
                            if (L == null)
                            {
                                ParentPanel.FinishWorkMode(null, lang.FILE_EXPLORER_TEXT_22_4);
                            }
                            else
                            {
                                using (L)
                                {
                                    Skip = !L.Run_GetExtractStatsInfo(Data, Items, F.WaitForTerminate);
                                }

                                IFileExplorer_ProgressForm_ExtractArchive F1 = new IFileExplorer_ProgressForm_ExtractArchive(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                                ParentPanel.ReplaceProgressForm(F1);

                                string ErrMsg = INodeList.Run_ExtractItems(FN, Items, DestPath, null, F1) >= 0 ? null : lang.FILE_EXPLORER_TEXT_24_4_28;
                                if (F1.WaitForTerminate.BoolValue) ErrMsg = null;

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    OppositePanel.Reload(); // Znovu nacitam obsah panela
                                }, ErrMsg);
                            }
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_ACTIVE:
                    {
                        string FN = FItems.ArchiveName;
                        string DestPath = OppositePanel.FItems.CurrentPath;

                        if (FItems[I].IsFile) // Je to subor?
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_23_10, FItems[I].Name, DestPath)))) return true; // Potvrdim extrahovanie
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_23_11, FItems[I].Name, DestPath)))) return true; // Potvrdim extrahovanie
                        }

                        System.Collections.Generic.List<string> Items = new System.Collections.Generic.List<string>();
                        Items.Add(FItems.GetNodeExpandPath(I));

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        OppositePanel.BeginLoadContent();

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;

                            INodeList L = INodeList.CreateNodeList(FN); // Vytvorim list
                            if (L == null)
                            {
                                ParentPanel.FinishWorkMode(null, lang.FILE_EXPLORER_TEXT_22_4);
                            }
                            else
                            {
                                using (L)
                                {
                                    Skip = !L.Run_GetExtractStatsInfo(Data, Items, F.WaitForTerminate);
                                }

                                IFileExplorer_ProgressForm_ExtractArchive F1 = new IFileExplorer_ProgressForm_ExtractArchive(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                                ParentPanel.ReplaceProgressForm(F1);

                                string ErrMsg = INodeList.Run_ExtractItems(FN, Items, DestPath, null, F1) >= 0 ? null : lang.FILE_EXPLORER_TEXT_24_4_28;
                                if (F1.WaitForTerminate.BoolValue) ErrMsg = null;

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    OppositePanel.Reload(); // Znovu nacitam obsah panela
                                }, ErrMsg);
                            }
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_SELECTED:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath;
                        int ExtractType = 0;
                        if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, string.Format(lang.FILE_EXPLORER_TEXT_23_4, DestPath), string.Format(lang.FILE_EXPLORER_TEXT_23_5), string.Format(lang.FILE_EXPLORER_TEXT_23_6), ref ExtractType)) return true; // Opytam sa ako dalej

                        System.Collections.Generic.List<string> Files = FItems.GetListOfSelectedFullNames_ArchivesSupportTest();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;

                            foreach (string FN in Files)
                            {
                                INodeList L = INodeList.CreateNodeList(FN); // Vytvorim list
                                if (L != null)
                                {
                                    if (!L.Run_GetExtractStatsInfo(Data, null, F.WaitForTerminate))
                                    {
                                        if (F.WaitForTerminate.BoolValue) // Bolo to prerusenie od uzivatela?
                                        {
                                            Skip = true;
                                            break;
                                        }
                                    }
                                    L.Dispose();
                                }
                                if (Skip) break;
                            }

                            IFileExplorer_ProgressForm_ExtractArchive F1 = new IFileExplorer_ProgressForm_ExtractArchive(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            int R1 = 0;
                            foreach (string FN in Files)
                            {
                                string SubDirName = ExtractType == 0 ? null : IFileSystem.ExtractNameOnly(FN);
                                int R = INodeList.Run_ExtractItems(FN, null, DestPath, SubDirName, F1);
                                if (R == 0) continue;
                                if (R == 1) break; // Prerusenie spracovavania?
                                if (R1 == 1) continue; // Pokracovat vzdy?

                                R1 = 0; // Poskodeny archiv - opytam sa ako dalej
                                if (!F1.ShowEditor_ChooseFromList(string.Format(lang.FILE_EXPLORER_TEXT_23_7, DestPath), string.Format(lang.FILE_EXPLORER_TEXT_23_8), string.Format(lang.FILE_EXPLORER_TEXT_23_9), ref R1)) break;
                            }

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload();
                                OppositePanel.Reload(); // Znovu nacitam obsah panela
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_ACTIVE:
                    {
                        string FN = FItems.GetNodeExpandPath(I);
                        string DestPath = OppositePanel.FItems.CurrentPath;
                        string SubDirName = IFileSystem.ExtractNameOnly(FN);

                        int R = 0;
                        if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, string.Format(lang.FILE_EXPLORER_TEXT_23_1, FN, DestPath), string.Format(lang.FILE_EXPLORER_TEXT_23_2, SubDirName), string.Format(lang.FILE_EXPLORER_TEXT_23_3, SubDirName), ref R)) return true; // Opytam sa ako dalej
                        if (R == 0) SubDirName = null; // Nepouzije sa podpriecinok

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        BeginLoadContent();
                        OppositePanel.BeginLoadContent();

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;

                            INodeList L = INodeList.CreateNodeList(FN); // Vytvorim list
                            if (L == null)
                            {
                                ParentPanel.FinishWorkMode(null, lang.FILE_EXPLORER_TEXT_22_4);
                            }
                            else
                            {
                                using (L)
                                {
                                    Skip = !L.Run_GetExtractStatsInfo(Data, null, F.WaitForTerminate);
                                }

                                IFileExplorer_ProgressForm_ExtractArchive F1 = new IFileExplorer_ProgressForm_ExtractArchive(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                                ParentPanel.ReplaceProgressForm(F1);

                                string ErrMsg = INodeList.Run_ExtractItems(FN, null, DestPath, SubDirName, F1) >= 0 ? null : lang.FILE_EXPLORER_TEXT_24_4_28;
                                if (F1.WaitForTerminate.BoolValue) ErrMsg = null;

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    Reload();
                                    OppositePanel.Reload(); // Znovu nacitam obsah panela
                                }, ErrMsg);
                            }
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE
                case ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE:
                    {
                        if (FItems.GetCountOfSelectedFullNames_ArchivesSupportExtract() > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        else return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_ARCHIVE_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_SELECTED:
                    {
                        if (!IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_22_6)) return true; // Potvrdit test

                        System.Collections.Generic.List<string> Files = FItems.GetListOfSelectedFullNames_ArchivesSupportTest();

                        IFileExplorer_ProgressForm_TestArchive F = new IFileExplorer_ProgressForm_TestArchive(600, 140); // Vytvorim progress formular
                        ParentPanel.StartWorkMode(F, delegate() // Spustim proces
                        {
                            bool AllOK = true; // Priznak vsetkych OK testov

                            for (int i = 0; i < Files.Count; i++) // Postupne spracovavam subory
                            {
                                bool B = false; string Msg = "";
                                
                                INodeList L = INodeList.CreateNodeList(Files[i]);
                                if (L == null)
                                {
                                    B = false;
                                    Msg = string.Format(lang.FILE_EXPLORER_TEXT_22_4, Files[i]); // Nepodporovany archiv
                                }
                                else
                                {
                                    B = L.TestArchive(out Msg, F); // Testujem archiv
                                    L.Dispose(); // Zrusim list
                                }

                                if (B) continue;
                                if (Msg == "")
                                {
                                    AllOK = false;
                                    break; // Prerusene uzivatelom?
                                }

                                int R = 0;
                                if (i < Files.Count - 1)
                                {
                                    Msg = string.Format(lang.FILE_EXPLORER_TEXT_22_5, Files[i], Msg); // Pridam otazku
                                    if (!F.ShowEditor_ChooseFromList(Msg, lang.FILE_EXPLORER_TEXT_22_5_1, lang.FILE_EXPLORER_TEXT_22_5_2, ref R))
                                    {
                                        AllOK = false;
                                        Msg = "";
                                        break;
                                    }
                                }
                                else
                                {
                                    if (!F.ShowEditor_ChooseFromList(Msg, lang.FILE_EXPLORER_TEXT_22_5_3, lang.FILE_EXPLORER_TEXT_22_5_4, ref R))
                                    {
                                        AllOK = false;
                                        Msg = "";
                                        break;
                                    }

                                }
                                AllOK = false; // Nie su vsetky testy OK
                            }

                            ParentPanel.FinishWorkMode(null, AllOK ? lang.FILE_EXPLORER_TEXT_22_3 : null);
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_ACTIVE:
                    {
                        string FN = FItems.GetNodeExpandPath(I);
                        if (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_22_1, FN))) return true; // Potvrdit test

                        IFileExplorer_ProgressForm_TestArchive F = new IFileExplorer_ProgressForm_TestArchive(600, 140); // Vytvorim progress formular
                        ParentPanel.StartWorkMode(F, delegate() // Spustim proces
                        {
                            string ErrorMsg; bool B;
                            INodeList L = INodeList.CreateNodeList(FN); // Vytvorim nodelist
                            if (L == null)
                            {
                                B = false;
                                ErrorMsg = string.Format(lang.FILE_EXPLORER_TEXT_22_4, FN);
                            }
                            else 
                            {
                                using (L)
                                {
                                    B = L.TestArchive(out ErrorMsg, F);
                                }
                            }
                            ParentPanel.FinishWorkMode(null, B ? lang.FILE_EXPLORER_TEXT_22_3 : ErrorMsg);
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE
                case ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE:
                    {
                        if (FItems.GetCountOfSelectedFullNames_ArchivesSupportTest() > 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        else return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_TEST_ARCHIVE_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SHELL_OPEN_AS
                case ICmd.CMD_ID_FILE_EXPLORER_SHELL_OPEN_AS:
                    {
                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        L.Add(FItems.GetNodeExpandPath(I));
                        
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "openas"); // Volam prikaz
                        
                        L.Clear(); L = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_SELECTED:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = FItems.CurrentPath; // Ziskam zdrojovu cestu

                        if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_3, DestPath)))) return true; // Potvrdim kopirovanie oznacenych zaznamov

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>(); // Vytvorim zoznam
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Zoznam priecinkov

                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        bool CalculateInfo = false; // Urcim statistiku pre subory a vytvorim zoznam priecinkov na vypocet statistiky
                        int C = FItems.NodesCount;
                        for (int i = 0; i < C; i++)
                        {
                            INode N = FItems[i];
                            if (!N.Selected) continue;
                            if (N.IsFile) // Subor?
                            {
                                Data.AddFile(N.Size);
                            }
                            else // Priecinok?
                            {
                                Dirs.Add(FItems.GetNodeExpandPath(i));
                                CalculateInfo = true;
                            }
                            L.Add(FItems.GetNodeExpandPath(i));
                        }

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_21_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (FItems.SupportFastMoveToPath(DestPath))
                            {
                                Skip = true;
                            }
                            else
                            {
                                if (CalculateInfo) // Pocitam?
                                {
                                    foreach (string FN in Dirs)
                                    {
                                        if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                        {
                                            Skip = true;
                                            break;
                                        }
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_MoveItems F1 = new IFileExplorer_ProgressForm_MoveItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_MoveItems(SourcePath, DestPath, L, F1, Data, FItems.ConnectionProvider, OppositePanel.FItems.ConnectionProvider); // Spustim kopirovanie
                            Dirs.Clear(); Dirs = null; // Vycistim objekty
                            L.Clear(); L = null;

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });
                        return true; // Prikaz bol spusteny
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_ACTIVE:
                    {
                        bool CalculateInfo = true;
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = FItems.CurrentPath; // Ziskam zdrojovu cestu

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();

                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        if (FItems[I].IsFile) // Je to subor?
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_1, FItems[I].Name, DestPath)))) return true; // Potvrdim presun
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim subor
                            CalculateInfo &= false; // Nebude sa pocitat statistika
                            Data.AddFile(FItems[I].Size);
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_2, FItems[I].Name, DestPath)))) return true; // Potvrdim presun
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim priecinok
                            CalculateInfo &= true; // Bude sa ratat statistika
                        }

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_21_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (FItems.SupportFastMoveToPath(DestPath))
                            {
                                Skip = true;
                            }
                            else
                            {
                                if (CalculateInfo)
                                {
                                    foreach (string FN in L)
                                    {
                                        if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                        {
                                            Skip = true;
                                            break;
                                        }
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_MoveItems F1 = new IFileExplorer_ProgressForm_MoveItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_MoveItems(SourcePath, DestPath, L, F1, Data, FItems.ConnectionProvider, OppositePanel.FItems.ConnectionProvider); // Spustim kopirovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });
                        return true; // Prikaz bol spusteny
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE:
                    {
                        switch (IApp.Settings.FileExplorer_MoveItemMode)
                        {
                            case 1: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_ACTIVE, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie interne
                            case 0: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_ACTIVE, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie shellom
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SELECTED:
                    {
                        switch (IApp.Settings.FileExplorer_MoveItemMode)
                        {
                            case 1: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_INTERNAL_SELECTED, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie interne
                            case 0: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_SELECTED, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie shellom
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_SELECTED:
                    {
                        if (FItems.IsArchive) // Bude to extrahovanie
                        {
                            return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                        }

                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = FItems.CurrentPath; // Ziskam zdrojovu cestu

                        if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_3, DestPath)))) return true; // Potvrdim kopirovanie oznacenych zaznamov

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>(); // Vytvorim zoznam
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Zoznam priecinkov
                        
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        bool CalculateInfo = false; // Urcim statistiku pre subory a vytvorim zoznam priecinkov na vypocet statistiky
                        int C = FItems.NodesCount;
                        for (int i = 0; i < C; i++)
                        {
                            INode N = FItems[i];
                            if (!N.Selected) continue;
                            if (N.IsFile) // Subor?
                            {
                                Data.AddFile(N.Size);
                            }
                            else // Priecinok?
                            {
                                Dirs.Add(FItems.GetNodeExpandPath(i));
                                CalculateInfo = true;
                            }
                            L.Add(FItems.GetNodeExpandPath(i));
                        }

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo) // Pocitam?
                            {
                                foreach (string FN in Dirs)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_CopyItems F1 = new IFileExplorer_ProgressForm_CopyItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_CopyItems(SourcePath, DestPath, L, F1, Data, FItems.ConnectionProvider, OppositePanel.FItems.ConnectionProvider); // Spustim kopirovanie
                            Dirs.Clear(); Dirs = null; // Vycistim objekty
                            L.Clear(); L = null;

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });
                        return true; // Prikaz bol spusteny
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_ACTIVE:
                    {
                        if (FItems.IsArchive) // Bude to extrahovanie
                        {
                            return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_EXTRACT_COPY_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                        }

                        bool CalculateInfo = true;
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        string SourcePath = FItems.CurrentPath; // Ziskam zdrojovu cestu

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        if (FItems[I].IsFile) // Je to subor?
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_1, FItems[I].Name, DestPath)))) return true; // Potvrdim kopirovanie
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim subor
                            CalculateInfo &= false; // Nebude sa pocitat statistika
                            Data.AddFile(FItems[I].Size);
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_2, FItems[I].Name, DestPath)))) return true; // Potvrdim kopirovanie
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim priecinok
                            CalculateInfo &= true; // Bude sa ratat statistika
                        }

                        OppositePanel.BeginLoadContent();
                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_20_1);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo)
                            {
                                foreach (string FN in L)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            IFileExplorer_ProgressForm_CopyItems F1 = new IFileExplorer_ProgressForm_CopyItems(600, 96, !Skip, Data.FilesCount + Data.DirsCount, (ulong)Data.TotalSize);
                            ParentPanel.ReplaceProgressForm(F1);

                            INodeList.Run_CopyItems(SourcePath, DestPath, L, F1, Data, FItems.ConnectionProvider, OppositePanel.FItems.ConnectionProvider); // Spustim kopirovanie

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                                OppositePanel.Reload();
                            });
                        });
                        return true; // Prikaz bol spusteny
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED:
                    {
                        if ((IApp.Settings.FileExplorer_ConfirmDelete) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_19_3)))) return true; // Potvrdim vymazanie oznacenych zaznamov

                        string CurrPath = FItems.CurrentPath; // Aktualna cesta

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>(); // Vytvorim zoznam
                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>(); // Zoznam priecinkov

                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                        bool CalculateInfo = false; // Urcim statistiku pre subory a vytvorim zoznam priecinkov na vypocet statistiky
                        int C = FItems.NodesCount;
                        for (int i = 0; i < C; i++)
                        {
                            INode N = FItems[i];
                            if (!N.Selected) continue;
                            if (N.IsFile) // Subor?
                            {
                                Data.AddFile(N.Size);
                            }
                            else // Priecinok?
                            {
                                Dirs.Add(FItems.GetNodeExpandPath(i));
                                CalculateInfo = true;
                            }
                            L.Add(FItems.GetNodeExpandPath(i));
                        }

                        BeginLoadContent();

                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_19_4);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            bool Skip = false;
                            if (CalculateInfo) // Pocitam?
                            {
                                foreach (string FN in Dirs)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }
                            }

                            INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                            if (L == null) // Chyba?
                            {
                                ParentPanel.FinishWorkMode(null);
                                return;
                            }

                            IFileExplorer_ProgressForm_DeleteItems F1 = new IFileExplorer_ProgressForm_DeleteItems(500, 96, !Skip, Data.FilesCount + Data.DirsCount);
                            ParentPanel.ReplaceProgressForm(F1);

                            List.Run_DeleteItems(L, F1, Skip ? null : Data); // Spustim mazanie
                            List.Dispose();

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Znovu nacitam obsah panela
                            });
                        });
                        return true; // Prikaz bol spusteny
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE:
                    {
                        bool CalculateInfo = true;
                        string CurrPath = FItems.CurrentPath; // Aktualna cesta

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();

                        if (FItems[I].IsFile) // Je to subor?
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmDelete) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_19_1, FItems[I].Name)))) return true; // Potvrdim vymazanie suboru
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim subor
                            CalculateInfo &= false; // Nebude sa pocitat statistika
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmDelete) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_19_2, FItems[I].Name)))) return true; // Potvrdim vymazanie priecinku
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim priecinok
                            CalculateInfo &= true; // Bude sa ratat statistika
                        }

                        BeginLoadContent();
                        if (CalculateInfo) // Pocitat statistiku?
                        {
                            IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_19_4);
                            INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                            Data.SourceClusterSize = -1; Data.DestClusterSize = -1;

                            ParentPanel.StartWorkMode(F, delegate()
                            {
                                bool Skip = false;
                                foreach (string FN in L)
                                {
                                    if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate))
                                    {
                                        Skip = true;
                                        break;
                                    }
                                }

                                INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                                if (L == null) // Chyba?
                                {
                                    ParentPanel.FinishWorkMode(null);
                                    return;
                                }

                                IFileExplorer_ProgressForm_DeleteItems F1 = new IFileExplorer_ProgressForm_DeleteItems(500, 96, !Skip, Data.FilesCount + Data.DirsCount);
                                ParentPanel.ReplaceProgressForm(F1);

                                List.Run_DeleteItems(L, F1, Skip ? null : Data); // Spustim mazanie
                                List.Dispose();

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    Reload(); // Znovu nacitam obsah panela
                                });
                            });
                        }
                        else
                        {
                            IFileExplorer_ProgressForm_DeleteItems F = new IFileExplorer_ProgressForm_DeleteItems(500, 96, false, 0);
                            ParentPanel.StartWorkMode(F, delegate()
                            {
                                INodeList List = INodeList.CreateNodeList(CurrPath, FItems.ConnectionProvider);
                                if (L == null) // Chyba?
                                {
                                    ParentPanel.FinishWorkMode(null);
                                    return;
                                }

                                List.Run_DeleteItems(L, F); // Spustim mazanie
                                List.Dispose();

                                ParentPanel.FinishWorkMode(delegate()
                                {
                                    Reload(); // Znovu nacitam obsah panela
                                });
                            });
                        }
                           
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM
                case ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM:
                    {
                        if (FItems.SelectedCount == 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_DELETE_ITEM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_SELECTED:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_3, DestPath)))) return true; // Potvrdim presun

                        BeginLoadContent();
                        OppositePanel.BeginLoadContent();

                        System.Collections.Generic.List<string> L1 = FItems.GetListOfSelectedFullNames(); // Ziskam zoznam oznacenych poloziek
                        IShellContextMenu.InvokeExecuteShellCommand(ParentPanel.Handle, L1, "cut"); // Vykonam copy
                        L1.Clear(); L1.Add(DestPath);
                        IShellContextMenu.InvokeExecuteShellCommand(ParentPanel.Handle, L1, "paste"); // Vykonam paste

                        OppositePanel.Reload(); // Reload druheho panela
                        Reload(); // Reload aktivneho panela

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SHELL_ACTIVE:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        if (FItems[I].IsFile)
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_1, FItems[I].Name, DestPath)))) return true; // Potvrdim presun
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMove) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_18_2, FItems[I].Name, DestPath)))) return true; // Potvrdim presun
                        }

                        BeginLoadContent();
                        OppositePanel.BeginLoadContent();

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>(); L.Add(FItems.GetNodeExpandPath(I));
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "cut"); // Vykonam copy
                        L.Clear(); L.Add(DestPath);
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "paste"); // Vykonam paste

                        OppositePanel.Reload(FItems[I].KeyValue); // Reload druheho panela
                        Reload(); // Reload aktivneho panela

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM:
                    {
                        if (FItems.SelectedCount == 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_ITEM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_SELECTED:
                    {
                        if ((IApp.Settings.FileExplorer_ConfirmMoveToTrash) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_17_3)))) return true; // Potvrdim presun do kosa

                        System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames(); // Ziskam zoznam oznacenych zaznamov
                        BeginLoadContent();
                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_17_5);

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            int Choice = 0;
                            foreach (string FN in L)
                            {
                                int R;
                                int R1 = IFileSystem.GetObjectType(FN);
                                switch (R1)
                                {
                                    case IFileSystem.OBJECT_TYPE_FILE: R = IFileSystem.MoveFileToTrash(FN); break;
                                    case IFileSystem.OBJECT_TYPE_DIRECTORY: R = IFileSystem.MoveDirectoryToTrash(FN); break;
                                    default: R = 0; break;
                                }

                                if (R == IFileSystem.FS_ERROR_USER_ABORTED) break; // Ziadost o prerusenie?
                                if (F.WaitForTerminate.BoolValue) break;
                                if (R == 0) continue; // Dalsi zaznam

                                if (Choice == 1) continue; // Uz uzivatel potvrdil pokracovat pre vsetky?

                                // Opytam sa co robit
                                Choice = ParentPanel.ShowEditor_ChooseFromList(string.Format(R1 == IFileSystem.OBJECT_TYPE_DIRECTORY ? lang.FILE_EXPLORER_TEXT_17_6 : lang.FILE_EXPLORER_TEXT_17_6_1, IFileSystem.ExtractName(FN)), lang.FILE_EXPLORER_TEXT_17_7, lang.FILE_EXPLORER_TEXT_17_8, 0);
                                if (Choice == -1) break;
                            }

                            ParentPanel.FinishWorkMode(delegate()
                            {
                                Reload(); // Reload
                            });
                        });

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE:
                    {
                        int R;

                        BeginLoadContent();
                        if (FItems[I].IsFile)
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMoveToTrash) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_17_1, FItems[I].Name)))) return true; // Potvrdim presun do kosa
                            R = IFileSystem.MoveFileToTrash(FItems.GetNodeExpandPath(I));
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmMoveToTrash) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_17_2, FItems[I].Name)))) return true; // Potvrdim presun do kosa
                            R = IFileSystem.MoveDirectoryToTrash(FItems.GetNodeExpandPath(I));
                        }

                        switch (R)
                        {
                            case 0:
                            case IFileSystem.FS_ERROR_USER_ABORTED: 
                                break;
                            case IFileSystem.FS_ERROR_ACCESS_DENIED: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_9); break;
                            default: IApp.ShowError(lang.FILE_EXPLORER_TEXT_17_4); break;
                        }

                        Reload(FItems.GetNodeKeyValue(I == FItems.NodesCount - 1 ? I - 1 : I + 1)); // Reload

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM
                case ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM:
                    {
                        if (FItems.SelectedCount == 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_MOVE_TO_TRASH_ITEM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_ACTIVE:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        if (FItems[I].IsFile)
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_1, FItems[I].Name, DestPath)))) return true; // Potvrdim kopirovanie
                        }
                        else
                        {
                            if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_2, FItems[I].Name, DestPath)))) return true; // Potvrdim kopirovanie
                        }

                        OppositePanel.BeginLoadContent();

                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>(); L.Add(FItems.GetNodeExpandPath(I));
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "copy"); // Vykonam copy
                        L.Clear(); L.Add(DestPath);
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "paste"); // Vykonam paste

                        OppositePanel.Reload(); // Reload druheho panela

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_SELECTED:
                    {
                        string DestPath = OppositePanel.FItems.CurrentPath; // Ziskam cielovu cestu
                        if ((IApp.Settings.FileExplorer_ConfirmCopy) && (!IApp.ShowQuestion(string.Format(lang.FILE_EXPLORER_TEXT_16_3, DestPath)))) return true; // Potvrdim kopirovanie

                        OppositePanel.BeginLoadContent();

                        System.Collections.Generic.List<string> L1 = FItems.GetListOfSelectedFullNames(); // Ziskam zoznam oznacenych poloziek
                        IShellContextMenu.InvokeExecuteShellCommand(ParentPanel.Handle, L1, "copy"); // Vykonam copy
                        L1.Clear(); L1.Add(DestPath);
                        IShellContextMenu.InvokeExecuteShellCommand(ParentPanel.Handle, L1, "paste"); // Vykonam paste

                        OppositePanel.Reload(); // Reload druheho panela

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM:
                    {
                        if (FItems.SelectedCount == 0) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE, pAPP_TARGET, pPANEL_TARGET);
                        return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SELECTED, pAPP_TARGET, pPANEL_TARGET);
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_ACTIVE:
                    {
                        switch (IApp.Settings.FileExplorer_CopyItemMode)
                        {
                            case 1: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_ACTIVE, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie interne
                            case 0: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_ACTIVE, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie shellom
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SELECTED
                case ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SELECTED:
                    {
                        switch (IApp.Settings.FileExplorer_CopyItemMode)
                        {
                            case 1: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_INTERNAL_SELECTED, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie interne
                            case 0: return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_COPY_ITEM_SHELL_SELECTED, pAPP_TARGET, pPANEL_TARGET); // Kopirovanie shellom
                        }
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM
                case ICmd.CMD_ID_FILE_EXPLORER_RENAME_ITEM:
                    {
                        string Name = FItems[I].Name;
                        if (!IApp.ShowEditor_String(FItems[I].IsDirectory ? lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13 : lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_13_1, FItems[I].IsDirectory ? lang.FILE_EXPLORER_TEXT_14_1 : lang.FILE_EXPLORER_TEXT_14_2, ref Name, -1, false, "FILE_EXPLORER_RENAME_ITEM")) return true; // Ziskam novy nazov

                        Name = Name.Trim();
                        if (string.Compare(Name, FItems[I].Name, true) == 0) return true; // Ziadna zmena?

                        if ((Name == ".") || (Name == ".."))
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_5);
                            return true;
                        }

                        int R;
                        if (FItems[I].IsDirectory)
                        {
                            R = FItems.RenameFolder(FItems.GetNodeExpandPath(I), Name);
                        }
                        else
                        {
                            R = FItems.RenameFile(FItems.GetNodeExpandPath(I), Name);
                        }

                        switch (R)
                        {
                            case 0:
                                {
                                    Reload(); ActiveKeyValue = Name.ToLower();
                                    break; // Vsetko OK
                                }
                            case IFileSystem.FS_ERROR_FILE_EXISTS:
                                {
                                    if (IApp.ShowQuestion(lang.FILE_EXPLORER_TEXT_35)) // Potvrdim si prepisanie
                                    {
                                        FItems.Run_DeleteItems(new System.Collections.Generic.List<string>() { IFileSystem.AppendToPath(FItems.CurrentPath, Name) }, null, null);
                                        FItems.RenameFile(FItems.GetNodeExpandPath(I), Name);
                                        Reload(); ActiveKeyValue = Name.ToLower();
                                    }
                                } break;
                            case IFileSystem.FS_ERROR_DIRECTORY_EXISTS: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_7); break;
                            case IFileSystem.FS_ERROR_ACCESS_DENIED: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_9); break;
                            case IFileSystem.FS_ERROR_READ_ONLY: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_10); break;
                            default: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_5); break;
                        }

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER
                case ICmd.CMD_ID_FILE_EXPLORER_CREATE_FOLDER:
                    {
                        string Name = "";
                        if (!IApp.ShowEditor_String(lang.MENU_ITEM_TEXT_FILE_EXPLORER_ITEM_12, lang.FILE_EXPLORER_TEXT_14_4, ref Name, -1, false, "FILE_EXPLORER_CREATE_FOLDER")) return true; // Ziskam nazov

                        Name = Name.Trim(); // Vycistim
                        if ((Name == ".") || (Name == ".."))
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_5);
                            return true;
                        }

                        int R = FItems.CreateFolder(Name); // Volam vytvorenie
                        switch (R)
                        {
                            case 0:
                                {
                                    Reload(); ActiveKeyValue = Name.ToLower();
                                    break; // Vsetko OK
                                }
                            case IFileSystem.FS_ERROR_FILE_EXISTS: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_6); break;
                            case IFileSystem.FS_ERROR_DIRECTORY_EXISTS: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_7); break;
                            case IFileSystem.FS_ERROR_DEVICE_NOT_READY: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_8); break;
                            case IFileSystem.FS_ERROR_ACCESS_DENIED: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_9); break;
                            case IFileSystem.FS_ERROR_READ_ONLY: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_10); break;
                            default: IApp.ShowError(lang.FILE_EXPLORER_TEXT_14_5); break;
                        }

                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED
                case ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_SPACE_OCCUPIED:
                    {
                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_12_7);

                        INodeList.IComputeOccupiedSpaceData Data = new INodeList.IComputeOccupiedSpaceData(); // Data pre vypocet
                        Data.SourceDeviceRoot = FItems.DeviceRootPath;
                        Data.SourceFreeSpace = FItems.DeviceFreeSpace;
                        Data.SourceCapacity = FItems.DeviceCapacity;
                        Data.SourceClusterSize = FItems.DeviceClusterSize;

                        if (ParentPanel.IsDualPanelMode)
                        {
                            INodeList L = OppositePanel.FItems;
                            Data.DestDeviceRoot = L.DeviceRootPath;
                            Data.DestFreeSpace = L.DeviceFreeSpace;
                            Data.DestCapacity = L.DeviceCapacity;
                            Data.DestClusterSize = L.DeviceClusterSize;
                        }

                        System.Collections.Generic.List<string> Dirs = new System.Collections.Generic.List<string>();
                        if (FItems.SelectedCount == 0) // Ziadne oznacene zaznamy?
                        {
                            if (FItems[I].IsFile) // Je to subor?
                            {
                                Data.AddFile(FItems[I].Size); // Zaradim subor
                            }
                            else Dirs.Add(FItems.GetNodeExpandPath(I));
                        }
                        else
                        {
                            int C = FItems.NodesCount;
                            for (int i = 0; i < C; i++) // Vytvorim zoznam oznacenych priecinkov
                            {
                                INode N = FItems[i];
                                if (!N.Selected) continue; // Nie je oznaceny?

                                if (N.IsFile)
                                {
                                    Data.AddFile(FItems[i].Size); // Zaradim subor
                                    continue;
                                }
                                if (N.IsDirectory) Dirs.Add(FItems.GetNodeExpandPath(i));
                            }
                        }

                        ParentPanel.StartWorkMode(F, delegate()
                        {
                            foreach (string FN in Dirs)
                            {
                                if (!CalculateFolderSpaceOccupied(FN, Data, F.WaitForTerminate)) break;
                            }

                            if (F.WaitForTerminate.BoolValue) ParentPanel.FinishWorkMode(null);
                            else
                            {
                                System.Text.StringBuilder B = new System.Text.StringBuilder();
                                B.Append(lang.FILE_EXPLORER_TEXT_13); B.AppendLine(); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_1, ICore.Size2String((ulong)Data.TotalSize, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_2, Data.FilesCount); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_3, Data.DirsCount); B.AppendLine(); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_4, Data.SourceDeviceRoot); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_5, Data.SourceCapacity == -1 ? "N/A" : ICore.Size2String((ulong)Data.SourceCapacity, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_6, Data.SourceFreeSpace == -1 ? "N/A" : ICore.Size2String((ulong)Data.SourceFreeSpace, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_7, Data.SourceClusterSize == -1 ? "N/A" : ICore.Size2String((ulong)Data.SourceClusterSize, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_8, ICore.Size2String((ulong)Data.SourceSpaceOccupied, 0)); B.AppendLine();

                                B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_9, Data.DestDeviceRoot); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_10, Data.DestCapacity == -1 ? "N/A" : ICore.Size2String((ulong)Data.DestCapacity, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_11, Data.DestFreeSpace == -1 ? "N/A" : ICore.Size2String((ulong)Data.DestFreeSpace, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_12, Data.DestClusterSize == -1 ? "N/A" : ICore.Size2String((ulong)Data.DestClusterSize, 0)); B.AppendLine();
                                B.AppendFormat(lang.FILE_EXPLORER_TEXT_13_13, ICore.Size2String((ulong)Data.DestSpaceOccupied, 0)); B.AppendLine();
                                ParentPanel.FinishWorkMode(null, B.ToString());
                            }
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE
                case ICmd.CMD_ID_FILE_EXPLORER_CALCULATE_FOLDER_SIZE:
                    {
                        IFileExplorer_ProgressForm_CalculateFolderSize F = new IFileExplorer_ProgressForm_CalculateFolderSize(500, 96, lang.FILE_EXPLORER_TEXT_12_6);

                        ParentPanel.StartWorkMode(F, delegate() {
                            long L = CalculateFolderSize(FItems.GetNodeExpandPath(I), F.WaitForTerminate);
                            if (L == -1) ParentPanel.FinishWorkMode(null); // Prerusene?
                            else ParentPanel.FinishWorkMode(delegate()
                            {
                                FItems[I].Size = L; // Ulozim dlzku
                                FItems.DiscardDisplayData(I); // Aktualizujem polozku
                                FList.RedrawItems(I, I, false);
                                if (IApp.Settings.FileExplorer_SelectAfterCalculateFolderSize) ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ACTIVE, pAPP_TARGET, pPANEL_TARGET); // Vykonam oznacenie
                            });
                        });
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT_ACTIVE:
                    {
                        System.Collections.Generic.List<string> L;
                        L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                        L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "print"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RENAME_DEVICE
                case ICmd.CMD_ID_FILE_EXPLORER_RENAME_DEVICE:
                    {
                        string CurrentName = "";
                        if (IFileSystem.GetDeviceName(FItems.CurrentPath, out CurrentName) != 0) return true; // Ziskam aktualny nazov

                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_12_1, lang.FILE_EXPLORER_TEXT_12, ref CurrentName, 256, true, "FILE_EXPLORER_DEVICE_NAME")) return true; // Ziskam novy nazov
                        
                        int R = IFileSystem.SetDeviceName(FItems.CurrentPath, CurrentName);

                        switch (R)
                        {
                            case 0: IApp.ShowInfo(lang.FILE_EXPLORER_TEXT_12_5); break;
                            case IFileSystem.FS_ERROR_READ_ONLY: IApp.ShowError(lang.FILE_EXPLORER_TEXT_12_4); break;
                            case IFileSystem.FS_ERROR_ACCESS_DENIED: IApp.ShowError(lang.FILE_EXPLORER_TEXT_12_2); break;
                            default: IApp.ShowError(lang.FILE_EXPLORER_TEXT_12_3); break;
                        }

                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_UNSHARE_CURRENT_PATH
                case ICmd.CMD_ID_FILE_EXPLORER_UNSHARE_CURRENT_PATH:
                    {
                        string P = FItems.CurrentPath; // Ziskam cestu

                        switch (IFileSystem._GetPathType(P))
                        { // Ponecham len lokalnu cestu
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM:
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM_ROOT:
                                break;
                            default: return true; // Nie je podporovane
                        }

                        IShellContextMenu.InvokeShowAdvancedShareWindow(IApp.AppForm.Handle, P);

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SHARE_CURRENT_PATH
                case ICmd.CMD_ID_FILE_EXPLORER_SHARE_CURRENT_PATH:
                    {
                        string P = FItems.CurrentPath; // Ziskam cestu

                        switch (IFileSystem._GetPathType(P))
                        { // Ponecham len lokalnu cestu
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM:
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM_ROOT:
                                break;
                            default: return true; // Nie je podporovane
                        }

                        IShellContextMenu.InvokeShowAdvancedShareWindow(IApp.AppForm.Handle, P);

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RUN_COMMAND
                case ICmd.CMD_ID_FILE_EXPLORER_RUN_COMMAND:
                    {
                        string P = FItems.CurrentPath; // Ziskam cestu
                        
                        switch(IFileSystem._GetPathType(P)) { // Ponecham len lokalnu cestu
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM:
                            case IFileSystem.PATH_TYPE_LOCAL_FILE_SYSTEM_ROOT:
                            case IFileSystem.PATH_TYPE_SAMBA_COMPUTER_SHARE:
                            case IFileSystem.PATH_TYPE_SAMBA_FILE_SYSTEM:
                                break;
                            default: P = IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_WINDOWS); break;
                        }

                        IApp.OpenCommand(P); // Otvorim command

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES:
                    {
                        IShellContextMenu.InvokeShowItemPropertyWindow(IApp.AppForm.Handle, FItems.GetNodeExpandPath(I)); // Volam zobrazenie okna
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES_PATH
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_SHOW_PROPERTIES_PATH:
                    {
                        IShellContextMenu.InvokeShowItemPropertyWindow(IApp.AppForm.Handle, FItems.CurrentPath); // Volam zobrazenie okna
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_QUICK_FIND
                case ICmd.CMD_ID_FILE_EXPLORER_QUICK_FIND:
                    {
                        StartQuickFind(); // Spustim rychle hladanie
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PRINT:
                    {
                        System.Collections.Generic.List<string> L;
                        
                        L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                        if (FItems.SelectedCount == 0)
                        {
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                            IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "print"); // Vykonam prikaz
                            L.Clear(); L = null; // Zrusim zoznam
                            return true; // Prikaz bol vykonany
                        }

                        if (FItems.SelectedFilesCount == 0) return true; // Nie je co tlacit?
                        if (!IApp.ShowQuestion(lang.MakeInflection_Int(FItems.SelectedFilesCount, lang.FILE_EXPLORER_TEXT_14_3))) return true; // Opytam sa

                        int C = FItems.NodesCount;
                        for (int i = 0; i < C; i++)
                        {
                            if (!FItems[i].Selected) continue; // Nie je to oznaceny zaznam?
                            if (!FItems[i].IsFile) continue; // Nie je to subor
                            L.Clear(); L.Add(FItems.GetNodeExpandPath(i));
                            IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "print"); // Vykonam prikaz pre kazdy subor
                        }

                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT:
                    {
                        System.Collections.Generic.List<string> L;
                        if (FItems.SelectedCount == 0)
                        {
                            L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        }
                        else
                        {
                            L = FItems.GetListOfSelectedFullNames();
                        }
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "cut"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_CUT_ACTIVE:
                    {
                        System.Collections.Generic.List<string> L;
                        L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                        L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "cut"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY:
                    {
                        System.Collections.Generic.List<string> L;
                        if (FItems.SelectedCount == 0)
                        {
                            L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                            L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        }
                        else
                        {
                            L = FItems.GetListOfSelectedFullNames();
                        }
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "copy"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_COPY_ACTIVE:
                    {
                        System.Collections.Generic.List<string> L;
                        L = new System.Collections.Generic.List<string>(); // Zoznam objektov
                        L.Add(FItems.GetNodeExpandPath(I)); // Zaradim aktualny zaznam
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "copy"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PASTE
                case ICmd.CMD_ID_FILE_EXPLORER_WINDOWS_SHELL_PASTE:
                    {
                        BeginLoadContent();
                        System.Collections.Generic.List<string> L = new System.Collections.Generic.List<string>();
                        L.Add(FItems.CurrentPath);
                        IShellContextMenu.InvokeExecuteShellCommand(IApp.AppForm.Handle, L, "paste"); // Vykonam prikaz
                        L.Clear(); L = null; // Zrusim zoznam
                        Reload();
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_BY_FILTER
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_BY_FILTER:
                    {
                        using (INodeFilters Filters = new INodeFilters())
                        {
                            Filters.Deserialize(FParams.GetParam("SELF", ""));
                            if (!Filters.EditWithForm(lang.FILE_EXPLORER_TEXT_10)) return true; // Volam zmenu filtra
                            FParams.SetParam("SELF", Filters.Serialize()); // Ulozim novu hodnotu

                            IApp.App.WaitCursor = true;
                            FItems.SelectItemsByFilter(Filters); // Volam oznacenie
                            FList.Refresh(); // Prekreslim zoznam
                            UpdateStatuses(); // Aktualizujem statusy
                            IApp.App.WaitCursor = false;
                            return true; // Prikaz vykonany
                        }
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_HIDE_SELECTION
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_HIDE_SELECTION:
                    {
                        IApp.App.WaitCursor = true;

                        string K = ActiveKeyValue;
                        FList.BeginCreate();
                        FItems.DeleteSelectedNodes(); // Vymazem zaznamy
                        FItems.DiscardDisplayData();
                        FillList(false);
                        FList.EndCreate(FItems.FindByKeyValue(K));
                        FList.Refresh();
                        UpdateStatuses(); // Aktualizujem statusy

                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_LOAD
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_LOAD:
                    {
                        string FN = IApp.ShowEditor_ChooseFileLoad(lang.FILE_EXPLORER_TEXT_9_3, lang.FILE_EXPLORER_TEXT_9_2);
                        if (string.IsNullOrEmpty(FN)) return true; // Zrusene?

                        IApp.App.WaitCursor = true;

                        string Data;
                        if (IFileSystem.LoadStringFromTextFile(FN, out Data) != 0) // Nacitam obsah suboru
                        {
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_9_4);
                            return true; // hotovo
                        }

                        System.Collections.Generic.List<string> Items = ICore.String2StringList(Data, Environment.NewLine); // Ziskam zoznam
                        FItems.DeSelectAllItems(); // Zrusim oznacenie
                        FItems.SelectItemsByKeyValues(Items); // Oznacim zaznamy
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy

                        Items = null; // Uvolnim

                        IApp.App.WaitCursor = false;
                        Items = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_SAVE
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_FILE_SAVE:
                    {
                        string FN = IApp.ShowEditor_ChooseFileSave(lang.FILE_EXPLORER_TEXT_9_1, lang.FILE_EXPLORER_TEXT_9_2, FItems.CurrentPath);
                        if (string.IsNullOrEmpty(FN)) return true; // Zrusene?

                        IApp.App.WaitCursor = true;
                        System.Collections.Generic.List<string> Items = FItems.GetListOfSelectedKeyValues(); // Ziskam zoznam

                        IFileSystem.SaveStringToTextFile(FN, ICore.StringList2String(Items, Environment.NewLine), true); // Ulozim do suboru

                        IApp.App.WaitCursor = false;
                        Items = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_OTHER
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_OTHER:
                    {
                        IApp.App.WaitCursor = true;

                        IFileExplorerSubPanel P = OppositePanel; // Ziskam druhy panel
                        if (FItems.CanSelect) // Da sa oznacit tento zoznam?
                        {
                            System.Collections.Generic.List<string> List = P.FItems.GetListOfKeyValues(); // Ziskam zoznam key. hodnot druheho panela
                            FItems.DeSelectAllItems(); // Zrusim aktualne oznacenie
                            FItems.SelectItemsByKeyValues(List); // Oznacim rovnake zaznamy
                            FItems.InvertSelectAllItems(); // Preklopim oznacenie
                            FList.Refresh(); // Prekreslim zoznam
                            UpdateStatuses(); // Aktualizujem statusy
                            List = null;
                        }

                        if (P.FItems.CanSelect) // Da sa oznacit tento zoznam?
                        {
                            System.Collections.Generic.List<string> List = FItems.GetListOfKeyValues(); // Ziskam zoznam key. hodnot druheho panela
                            P.FItems.DeSelectAllItems(); // Zrusim aktualne oznacenie
                            P.FItems.SelectItemsByKeyValues(List); // Oznacim rovnake zaznamy
                            P.FItems.InvertSelectAllItems(); // Preklopim oznacenie
                            P.FList.Refresh(); // Prekreslim zoznam
                            P.UpdateStatuses(); // Aktualizujem statusy
                        }

                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_SAME
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_COMPARE_DIRS_SAME:
                    {
                        IApp.App.WaitCursor = true;

                        IFileExplorerSubPanel P = OppositePanel; // Ziskam druhy panel
                        if (FItems.CanSelect) // Da sa oznacit tento zoznam?
                        {
                            System.Collections.Generic.List<string> List = P.FItems.GetListOfKeyValues(); // Ziskam zoznam key. hodnot druheho panela
                            FItems.DeSelectAllItems(); // Zrusim aktualne oznacenie
                            FItems.SelectItemsByKeyValues(List); // Oznacim rovnake zaznamy
                            FList.Refresh(); // Prekreslim zoznam
                            UpdateStatuses(); // Aktualizujem statusy
                            List = null;
                        }

                        if (P.FItems.CanSelect) // Da sa oznacit tento zoznam?
                        {
                            System.Collections.Generic.List<string> List = FItems.GetListOfKeyValues(); // Ziskam zoznam key. hodnot druheho panela
                            P.FItems.DeSelectAllItems(); // Zrusim aktualne oznacenie
                            P.FItems.SelectItemsByKeyValues(List); // Oznacim rovnake zaznamy
                            P.FList.Refresh(); // Prekreslim zoznam
                            P.UpdateStatuses(); // Aktualizujem statusy
                        }

                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_EXT
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_EXT:
                    {
                        IApp.App.WaitCursor = true;
                        string Ext = FItems[I].Ext; // Ziskam priponu
                        System.Collections.Generic.List<string> List = FItems.GetListOfKeyValuesByExt(Ext); // Ziskam zoznam key. hodnot podla nazvu
                        FItems.SelectItemsByKeyValues(List);
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_EXT
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_EXT:
                    {
                        IApp.App.WaitCursor = true;
                        string Ext = FItems[I].Ext; // Ziskam priponu
                        System.Collections.Generic.List<string> List = FItems.GetListOfKeyValuesByExt(Ext); // Ziskam zoznam key. hodnot podla nazvu
                        FItems.DeSelectItemsByKeyValues(List);
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_NAME
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_SELECT_SAME_NAME:
                    {
                        IApp.App.WaitCursor = true;
                        string Name = FItems[I].NameOnly; // Ziskam priponu
                        System.Collections.Generic.List<string> List = FItems.GetListOfKeyValuesByNameOnly(Name); // Ziskam zoznam key. hodnot podla nazvu
                        FItems.SelectItemsByKeyValues(List);
                        List = null;
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_NAME
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SPECIAL_DESELECT_SAME_NAME:
                    {
                        IApp.App.WaitCursor = true;
                        string Name = FItems[I].NameOnly; // Ziskam priponu
                        System.Collections.Generic.List<string> List = FItems.GetListOfKeyValuesByNameOnly(Name); // Ziskam zoznam key. hodnot podla nazvu
                        FItems.DeSelectItemsByKeyValues(List);
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_LOAD
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_LOAD:
                    {
                        IApp.App.WaitCursor = true;

                        System.Collections.Generic.List<string> KeyValues = ICore.PasteStringListFromClipboard(); // Ziskam zoznam key. hodnot zo schranky
                        if (KeyValues == null) return true; // Chyba?
                        FItems.SelectItemsByKeyValues(KeyValues); // Volam oznacenie
                        KeyValues = null;
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_SAVE
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_SAVE:
                    {
                        IApp.App.WaitCursor = true;
                        System.Collections.Generic.List<string> Items = FItems.GetListOfSelectedKeyValues(); // Ziskam zoznam
                        if (!ICore.CopyStringListToClipboard(Items))
                        {
                            IApp.App.WaitCursor = false;
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_3); // Skopirujem zoznam do schranky
                        }
                        else IApp.App.WaitCursor = false;
                        Items = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FULL_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FULL_FILES:
                    {
                        IApp.App.WaitCursor = true;
                        System.Collections.Generic.List<string> Items = FItems.GetListOfSelectedFullNames(); // Ziskam zoznam
                        if (!ICore.CopyStringListToClipboard(Items))
                        {
                            IApp.App.WaitCursor = false;
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_3); // Skopirujem zoznam do schranky
                        }
                        else IApp.App.WaitCursor = false;
                        Items = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_FILES:
                    {
                        IApp.App.WaitCursor = true;
                        System.Collections.Generic.List<string> Items = FItems.GetListOfSelectedNames(); // Ziskam zoznam
                        if (!ICore.CopyStringListToClipboard(Items))
                        {
                            IApp.App.WaitCursor = false;
                            IApp.ShowError(lang.FILE_EXPLORER_TEXT_3); // Skopirujem zoznam do schranky
                        }
                        else IApp.App.WaitCursor = false;
                        Items = null;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_PATH
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_CLIPBOARD_PATH:
                    {
                        ICore.CopyTextToClipboard(FItems.CurrentPath); // Skopirujem cestu do schranky
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_FILES:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.SelectAllFiles(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_FILES:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.DeSelectAllFiles(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_FILES
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_FILES:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.InvertSelectAllFiles(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_DIRS
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL_DIRS:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.SelectAllDirs(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_DIRS
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL_DIRS:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.DeSelectAllDirs(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_DIRS
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL_DIRS:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.InvertSelectAllDirs(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_DESELECT_ALL:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.DeSelectAllItems(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ALL:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.InvertSelectAllItems(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_SELECT_ALL:
                    {
                        IApp.App.WaitCursor = true;
                        FItems.SelectAllItems(); // Volam oznacenie
                        FList.Refresh(); // Prekreslim zoznam
                        UpdateStatuses(); // Aktualizujem statusy
                        IApp.App.WaitCursor = false;
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ACTIVE
                case ICmd.CMD_ID_FILE_EXPLORER_SELECT_INVERT_ACTIVE:
                    {
                        FItems.SelectItem(I, !FItems.GetNodeSelection(I)); // Preklopim oznacenie
                        FList.RedrawItems(I, I, false); // Prekreslim
                        if (IApp.Settings.FileExplorer_MoveToNextAfterSelect) MoveToNextItem();
                        UpdateStatuses(); // Aktualizujem statusy
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL
                case ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_LEFT_PANEL:
                    {
                        if (ParentPanel.GetPanelPosition(this) == ICmd.CMD_PANEL_TARGET_RIGHT) return OppositePanel.ExecCMD(pCMD_ID, pAPP_TARGET, pPANEL_TARGET); // Patri to druhemu panelu?

                        System.Windows.Forms.ContextMenuStrip Menu = new System.Windows.Forms.ContextMenuStrip(); // Vytvorim popup menu
                        Menu.ImageList = IApp.App.AppSmallImageList;
                        INodeList_ROOT.CreateDeviceMenu(Menu.Items, Event_DeviceMenuItemClick); // Vyplnim menu

                        System.Drawing.Point P = new System.Drawing.Point(10, 10); P = FUpStatus.PointToScreen(P);
                        Menu.Show(P); // Zobrazim menu
                        
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL
                case ICmd.CMD_ID_FILE_EXPLORER_SHOW_DRIVE_MENU_RIGHT_PANEL:
                    {
                        if (ParentPanel.GetPanelPosition(this) == ICmd.CMD_PANEL_TARGET_LEFT) return OppositePanel.ExecCMD(pCMD_ID, pAPP_TARGET, pPANEL_TARGET); // Patri to druhemu panelu?

                        System.Windows.Forms.ContextMenuStrip Menu = new System.Windows.Forms.ContextMenuStrip(); // Vytvorim popup menu
                        Menu.ImageList = IApp.App.AppSmallImageList;
                        INodeList_ROOT.CreateDeviceMenu(Menu.Items, Event_DeviceMenuItemClick); // Vyplnim menu

                        System.Drawing.Point P = new System.Drawing.Point(10, 10); P = FUpStatus.PointToScreen(P);
                        Menu.Show(P); // Zobrazim menu

                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_DIRECT
                case ICmd.CMD_ID_FILE_EXPLORER_GO_DIRECT:
                    {
                        string Val = FItems.CurrentPath;
                        if (!IApp.ShowEditor_String(lang.FILE_EXPLORER_TEXT_5_1, lang.FILE_EXPLORER_TEXT_5_2, ref Val, -1, false, "FILE_EXPLORER_GO_DIRECT", null)) return true;

                        if (string.Compare(Val, FItems.CurrentPath) != 0)
                        {
                            Go(Val, false, false); // Expandujem
                        }

                        return true;
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_CHOOSE
                case ICmd.CMD_ID_FILE_EXPLORER_GO_CHOOSE:
                    {
                        string Path = IApp.ShowEditor_ChooseDirectory(lang.FILE_EXPLORER_TEXT_4, FItems.CurrentPath); // Vyberiem cestu
                        if (string.IsNullOrEmpty(Path)) return true; // Prerusene?
                        Go(Path, false, false, ""); // Prechod na cestu z druheho panela
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SAME_PANELS
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SAME_PANELS:
                    {
                        Go(OppositePanel.FItems.CurrentPath, false, false, OppositePanel.ActiveKeyValue);
                        return true; // Prikaz vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_NEXT_DEVICE
                case ICmd.CMD_ID_FILE_EXPLORER_GO_NEXT_DEVICE:
                    {
                        string Current = FItems.DeviceRootPath;

                        string P = Current;
                        while (true)
                        {
                            P = INodeList_ROOT.GetNextDeviceRootPath(P); // Ziskam dalsie zariadenie
                            if (P == Current) return true; // Uz som zasa na zaciatku?
                            if (Go(P, false, true, "")) return true; // Skusim expandovat
                        }
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_PREV_DEVICE
                case ICmd.CMD_ID_FILE_EXPLORER_GO_PREV_DEVICE:
                    {
                        string Current = FItems.DeviceRootPath;

                        string P = Current;
                        while (true)
                        {
                            P = INodeList_ROOT.GetPrevDeviceRootPath(P); // Ziskam dalsie zariadenie
                            if (P == Current) return true; // Uz som zasa na zaciatku?
                            if (Go(P, false, true, "")) return true; // Skusim expandovat
                        }
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_DESKTOP
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_DESKTOP: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_DESKTOP), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_DOCS
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_DOCS: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_MY_DOCS), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_IMAGES
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_IMAGES: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_MY_IMAGES), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_MUSIC
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_MUSIC: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_MY_MUSIC), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_VIDEOS
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_MY_VIDEOS: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_MY_VIDEOS), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_WINDOWS
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_WINDOWS: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_WINDOWS), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_SYSTEM
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_SYSTEM: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_SYSTEM), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_START
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_START: 
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_START), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_TEMP
                case ICmd.CMD_ID_FILE_EXPLORER_GO_SPECIAL_TEMP:
                    {
                        Go(IFileSystem.GetSpecialPath(IFileSystem.SPECIAL_PATH_ID_TEMP), false, true);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICE_ROOT
                case ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICE_ROOT:
                    {
                        if (FItems.ID == INodeList.NODE_LIST_ID_VIRTUAL) Go(FItems.DeviceRootPath, true, true, "", true, true, FItems.ConnectionProvider);
                        else Go(FItems.DeviceRootPath, true, true, FItems.GetSubKeyValue(1), true, true, FItems.ConnectionProvider);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICES
                case ICmd.CMD_ID_FILE_EXPLORER_GO_DEVICES:
                    {
                        Go("", true, true, FItems.GetSubKeyValue(0));
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_RELOAD
                case ICmd.CMD_ID_FILE_EXPLORER_RELOAD:
                    {
                        Reload(); // Volam nacitanie
                        return true; // Vsetko OK
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_GO_BACK
                case ICmd.CMD_ID_FILE_EXPLORER_GO_BACK:
                    {
                        string P = FItems.ParentPath;
                        if (P == FItems.CurrentPath) return true; // Ziadna zmena?

                        if (Go(P, false, true, FItems.KeyValue, true, true, FItems.ConnectionProvider)) return true; // Expandujem

                        if (FItems.ID == INodeList.NODE_LIST_ID_VIRTUAL) P = "";
                        else P = IFileSystem.ExtractPath(P); // Ziskam rodica
                        while (true)
                        {
                            if (Go(P, false, true)) return true; // Pokusim sa expandovat
                            P = IFileSystem.ExtractPath(P); // Dalsia uroven
                        }
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_EXPAND
                case ICmd.CMD_ID_FILE_EXPLORER_EXPAND:
                    {
                        if (FItems.IsBackNode(I)) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_GO_BACK, pAPP_TARGET, pPANEL_TARGET);
                        if (!FItems.CanNodeExpand(I)) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_OPEN, pAPP_TARGET, pPANEL_TARGET);
                        string P = FItems.GetNodeExpandPath(I); // Ziskam expandovaciu cestu
                        if (P == FItems.CurrentPath) return true; // Ziadna zmena?
                        Go(P, false, false, "", true, true, FItems.GetNodeConnectionProvider(I)); // Expandujem

                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_OPEN
                case ICmd.CMD_ID_FILE_EXPLORER_OPEN:
                    {
                        if (FItems.CanNodeOpen(I)) return ExecCMD(ICmd.CMD_ID_FILE_EXPLORER_FORCE_OPEN, pAPP_TARGET, pPANEL_TARGET);
                        return true; // Prikaz bol vykonany
                    }
                #endregion
                #region ICmd.CMD_ID_FILE_EXPLORER_FORCE_OPEN
                case ICmd.CMD_ID_FILE_EXPLORER_FORCE_OPEN:
                    {
                        if (FItems.SelectedFilesCount > 0) // Su oznacene zaznamy?
                        {
                            int R = 0;
                            if (!IApp.ShowEditor_ChooseFromList(IApp.App.AppTitle, lang.FILE_EXPLORER_TEXT_15_1, lang.FILE_EXPLORER_TEXT_15_2, lang.FILE_EXPLORER_TEXT_15_3, ref R)) return true; // Opytam sa uzivatela

                            if (R == 1)
                            {
                                System.Collections.Generic.List<string> L = FItems.GetListOfSelectedFullNames_Files(); // Ziskam zoznam oznacenych suborov
                                foreach (string FN in L)
                                {
                                    IApp.RunFile(FN, FItems.CurrentPath); // Spustim subor
                                }
                                L.Clear(); L = null;
                                return true; // Prikaz vykonany
                            }
                        }
                        IApp.RunFile(FItems.GetNodeExpandPath(I), FItems.CurrentPath); // Spustim subor
                        return true; // Prikaz bol vykonany
                    }
                #endregion
            }
            return false; // Prikaz sa nevykonal
        }
        /// <summary>Aktivacia panela</summary>
        public void ActivatePanel()
        {
            IApp.CurrentVisualTheme.FileExplorer_UpStatus_Active.Apply(FUpStatus);
            IApp.CurrentVisualTheme.FileExplorer_DownStatus_Active.Apply(FDownStatus);
            FList.Focus(); // Nastavim fokus
        }
        /// <summary>Deaktivacia panela</summary>
        public void DeactivatePanel()
        {
            IApp.CurrentVisualTheme.FileExplorer_UpStatus_InActive.Apply(FUpStatus);
            IApp.CurrentVisualTheme.FileExplorer_DownStatus_InActive.Apply(FDownStatus);
        }
        /// <summary>Metoda: CreatePanelMenu</summary>
        /// <param name="pParent">parameter</param>
        public void CreatePanelMenu(System.Windows.Forms.ToolStripItemCollection pParent)
        {
            switch (FItems.ID)
            {
                case INodeList.NODE_LIST_ID_ROOT: 
                    CreateMenu_NODE_LIST_ID_ROOT(pParent); break;
                case INodeList.NODE_LIST_ID_SMB_SHARES:
                    CreateMenu_NODE_LIST_ID_SMB_SHARES(pParent); break;
                case INodeList.NODE_LIST_ID_SMB_NETWORK:
                    CreateMenu_NODE_LIST_ID_SMB_NETWORK(pParent); break;
                case INodeList.NODE_LIST_ID_LOCAL_ITEMS: 
                    CreateMenu_NODE_LIST_ID_LOCAL_ITEMS(pParent); break;
                case INodeList.NODE_LIST_ID_GZIP_ARCHIVE:
                    CreateMenu_NODE_LIST_ID_GZIP_ARCHIVE(pParent); break;
                case INodeList.NODE_LIST_ID_TAR_ARCHIVE:
                    CreateMenu_NODE_LIST_ID_TAR_ARCHIVE(pParent); break;
                case INodeList.NODE_LIST_ID_RAR_ARCHIVE:
                    CreateMenu_NODE_LIST_ID_RAR_ARCHIVE(pParent); break;
                case INodeList.NODE_LIST_ID_CLOUD_ROOT:
                    CreateMenu_NODE_LIST_ID_CLOUD_ROOT(pParent); break;
                case INodeList.NODE_LIST_ID_FTP:
                    CreateMenu_NODE_LIST_ID_FTP(pParent); break;
                case INodeList.NODE_LIST_ID_ZIP_ARCHIVE:
                    CreateMenu_NODE_LIST_ID_ZIP_ARCHIVE(pParent); break;
                case INodeList.NODE_LIST_ID_VIRTUAL:
                    CreateMenu_NODE_LIST_ID_VIRTUAL(pParent); break;
            }
        }
        /// <summary>Aktualizacia objektu po zmene vizualnej temy</summary>
        public void UpdateAfterChangeVisualTheme()
        {
            if (ParentPanel.ActivePanel == this)
            {
                IApp.CurrentVisualTheme.FileExplorer_UpStatus_Active.Apply(FUpStatus);
                IApp.CurrentVisualTheme.FileExplorer_DownStatus_Active.Apply(FDownStatus);
            }
            else
            {
                IApp.CurrentVisualTheme.FileExplorer_UpStatus_InActive.Apply(FUpStatus);
                IApp.CurrentVisualTheme.FileExplorer_DownStatus_InActive.Apply(FDownStatus);
            }
            IApp.CurrentVisualTheme.FileExplorer_List_DefaultItem.Apply(FList);
            FList.Invalidate();
        }
        /// <summary>Vytvorenie obsahu zo zoznamu</summary>
        /// <param name="pList">zoznam</param>
        /// <returns>true / false</returns>
        public bool CreateContentFromList(INodeList pList, string pInitKeyValue = "", bool pUpdateIcons = true)
        {
            BeginLoadContent(); // Zacinam load
            
            SaveNodeListParams(); // Ulozim parametre
            INodeList Old = FItems; // Odlozim aktualny zoznam

            FItems = pList; // Nastavim novy
            LoadNodeListParams(); // Nacitam parametre

            FList.BeginCreate();
            FillList((Old == null) || (Old.ID != FItems.ID)); // Vyplnim zoznam
            FList.EndCreate(FItems.FindByKeyValue(pInitKeyValue));

            if (Old != null) Old.Dispose(); // Zrusim povodny zaznam
            FLastListUpdated = DateTime.Now.Ticks;
            UpdateStatuses(); // Aktualizujem statusy

            FList.SetSortIcon(!FItems.CanSort ? -1 : FItems.SortColumn, FItems.SortAsc); // Nastavim ikonu triedenia
            FIconExtractor.Reset(IApp.Settings.FileExplorer_DisplayIconMode, FItems); FIconExtractor.Enabled = pUpdateIcons;

            FItems.StartChangedWatch(); // Spustim dohlad nad zmenami
            FTimer.Start(); // Spustim casovac

            IApp.GlobalData.FileExplorer_ExpandHistory.Add(FItems.CurrentPath); // Zaradim cestu do historie

            return true;
        }
    }
}
